Add users to sudo to “root” account

“george is not in the sudoers file. This incident will be reported.”

Some of you may have encountered an error similar to one listed above. Most of us then switches to root account and perform the requires operations. But it is possible for users to take up the root privileges through the sudo command by editing the sudo configuration file. If you want to make, for example, the user ‘george’ be able to sudo to “root”, use the following command:

su (and enter the root password)
nano /etc/sudoers

Move to the section where the following is written

# User privilege specification
root    ALL=(ALL:ALL) ALL

Edit the file to look like

# User privilege specification
root    ALL=(ALL:ALL) ALL
george  ALL=(ALL:ALL) ALL

Save the file. Now ‘george’ can use the sudo command without any error.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s