How do I add more users to the "sudoers" file?
|
feedback
|
|
UK is right, just edit the file /etc/sudoers. But you are supped to use /usr/sbin/visudo as your editor, since that will to some sanity checks before you exit. So that would be:
Update: Added some links that could be useful: | |||||||
feedback
|
|
Just edit your sudoers file
and add the username like 'uk' without quotes
Save and exit would give the access | |||||||||
feedback
|
|
My preferred method is to add them to the admin group. In Ubuntu flavour linux the admin group can sudo and it is easy to add someone to that group:
Your mileage may vary with other distros, however, someone thought the group method made more sense than the sudoers file getting itself updatified. Less room for getting it wrong and locking everyone out of being superuser seems to be the reason. | |||
|
feedback
|
|
visudo opens the sudoers file and has samples for simple situations. You may have to add option 'NOPASSWD' if user scripts would use commands/binaries which can be run only with "sudo". e.g. ALL=(ALL) NOPASSWD: ALL It is also possible to specify group instead of user name. So you need not list each and every user. e.g. %users localhost=/sbin/shutdown -h now | |||
|
feedback
|
|
In openbsd you would also need to add your user to the group 'wheel' or any group enable to do sudo. | |||
|
feedback
|
