Disabling password prompt for sudo users

Most often GNU/Linux users come across the sudo utility that allows users to run programs with the security privileges of another user (normally the superuser, or root). Its name is a concatenation of the su command (which grants the user a shell of another user, normally the superuser) and “do”, or take action. But on executing any command with sudo requests the user to provide his own password once and can be used afterwards. For that to occur the particular user must be in sudoers file (refer to my post regarding adding user for sudo privileges.

$ sudo vim /etc/sudoers
[sudo] password for anoop:

To disable this sudo password prompt edit the /etc/sudoers file as follows.

Read More »

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.