4

I've looked at How do I add a user to the "sudo" group? and added user (say 'abc') to sudo group

But now when user 'abc' tries to use sudo commands ubuntu says, 'abc' is not in sudoers list, this incident will be reported.

BTW I'm using ubuntu server 11.04 if it matters.

Thanks

wisemonkey
  • 3,393
  • 1
    Better and more detail can be found here: http://askubuntu.com/questions/7477/how-can-i-add-a-new-user-as-sudoer – Mark Russell Sep 26 '11 at 00:36
  • Thanks I was looking something for existing user, but I'll keep this one handy in case need to add more users. – wisemonkey Sep 26 '11 at 01:05

2 Answers2

3

The group you want to add the user to is admin.

Mark Russell
  • 7,376
  • yup got it working Thanks. though I need to read what is difference between group sudo and admin, I'll do it later. – wisemonkey Sep 26 '11 at 01:03
  • @wisemonkey: see http://askubuntu.com/questions/43317/what-is-the-difference-between-the-sudo-and-admin-group – enzotib Sep 26 '11 at 07:25
2

You shouldn't consider these things "sudo commands". Sudo is a command that enables users to run certain commands as root. Users in the "admin" group can run any command as root. But sudo can also be used to enable a user to shutdown the system, but nothing else, for instance. Remember that root can do anything in the system, which means that any user in the "admin" group can also do anything, including reading other users files or removing another user from the "admin" group.

You can read the full documentation for it here: http://manpages.ubuntu.com/manpages/oneiric/en/man5/sudoers.5.html

  • Thanks for explanation, I understand sudo itself is command allowing other commands rights to access system data. However while asking question, I couldn't think of proper terminology to use. – wisemonkey Sep 26 '11 at 18:22
  • Yes, but the point was that if you add a user to the admin group, then you give access to everything, but with sudo, you don't have to grant access to everything. – Jo-Erlend Schinstad Sep 27 '11 at 00:20
  • Yes I understand it now :) That was exactly my problem, when I added user to sudo, he could shutdown/reboot but couldn't modify system files (which was the purpose). I used to consider 'sudo' and 'admin' as same. – wisemonkey Sep 28 '11 at 23:47