Feb 24, 2012

How to edit in sudoers command ?

Sudoers are those whom delegate some admin tasks to the normal user. How to add a user to the sudoers list? Believe it or not, this is a fairly common question and in all reality the answer is quite simple. Adding a user to the sudoers list on a fully installed Linux system such as Debian is only possible via the command visudo. Users in the sudoers list are allowed the privileges to run commands and open files as the root user. In the following quick tutorial, we will show you how adding a new sudoer is quickly done.
How to add a user to the sudoers list:
1. Open a Root Terminal and type visudo (to access and edit the list)
2. Using the up/down arrows, navigate to the bottom of the sudoers file that is now displayed in the terminal
3. Just under the line that looks like the following:
root ALL=(ALL) ALL 
4. Add the following (replacing user with your actual username)
sir ALL=(ALL) 
5. Now press Ctrl+X and press Y when promted to save
That's it, your new user now has root privileges!
Example Sudoers Screenshot: