Kunaljain's Weblog

August 28, 2008

Adding User to “sudoers” File

Filed under: Linux Tips & Tricks,Mac — Kunal Jain @ 13:30

To give a user the ability to use the sudo command you must add them to the sudoers file located in /ect/sudoers

Open the Terminal, Once the Terminal is Open login as root and open the file /etc/sudoers

sudo gedit /etc/sudoers

if you want to use vim you can simply enter the following into the Terminal

sudo visudo

Once you have the sudoers file open, scroll down to the line

root ALL=(ALL) ALL

Add the following line below the root line

user ALL=(ALL) ALL

***Replace “user” with the name of the account you want to give the sudo access***

Save and Close the file. The new user has now been added to the sudoers file and can use the sudo command

Create a free website or blog at WordPress.com.