2

Possible Duplicate:
How do I add a user to the “sudo” group?

I recently became a UNIX admin for some relatives, and they are quite far up the creek on how to use ubuntu. I know that one key to UNIX administration is not to use the Admin account as little as possible, which I'm trying to enforce on their machine. I've looked at other articles regarding this, but they do the easy way out - changing the account to Administrator. That is changing the permissions completely. I want my standard user account to be able to execute sudo commands, but not be an administrator account. Thank you in advance for any help.

  • 2
    If a user uses sudo it is essentially an Administrator. – Uri Herrera Dec 31 '12 at 18:53
  • ...But doesn't that allow you to do administrative commands without being administrator? – sharksfan98 Dec 31 '12 at 19:04
  • 1
    Semantics, if you use sudo you can do whatever you want in that machine, thus you're the Administrator. – Uri Herrera Dec 31 '12 at 19:13
  • 1
    The only dangerous part about being an administrator is that an administrator can use sudo and thus can make system-level changes. By allowing a normal user to use sudo, you are essentially making him an administrator just as dangerous as any other. – Andrew Soutar Dec 31 '12 at 19:28

1 Answers1

1

Ubuntu has taken care of these issues for you, you don't need to worry about the Standard user or even the Administrator using the Super User priviledges all the time. In order to be able to use the sudo command, the Standard User needs to be listed in the /etc/sudoers file; the Administrator is automatically listed in this file. To add a user to this file, type the following command at the terminal:

sudo nano /etc/sudoers

You will see the following lines:

%sudo ALL=(ALL:ALL) ALL

Just add the name of the user who is to be able to use the sudo priviledges below these lines. To save the file, press Ctrl + o and to exit, press Ctrl + x.
Unless the user is listed here, she won't be able to use the sudo command, and it will return the error "The user"(the user name) is not listed in the sudoers list. This incident will be reported.

jobin
  • 27,708