07 December, 2010

How do add users to sudoers list?

Tired of getting told that I'm not in the sudoers file. How do I add myself to it, and is there any reason that I wouldn't want to?

sudo - Debian Wiki
http://wiki.debian.org/sudo

SUDO Configuration in Debian
http://www.debianhelp.co.uk/sudo.htm

Debian User Forums • View topic - Proper way to open apps as root in X
http://forums.debian.net/viewtopic.php?f=16&t=53366

Switch over to root and type visudo. The benefit of using visudo is that it will check syntax and whatever else and warn you of any problems you may have introduced into the sudoers file.

Code:
su -
visudo
visudo shows me that there is a group I could place myself into called 'sudo'. So instead of fooling around in the sudoers file add yourself to the 'sudo' group if you like ... that's what I've done.

Code:
%sudo ALL=(ALL) ALL
To add your normal user (morphus) to this group:

Code:
su -
usermod -a -G sudo morphus
The 'morphus' user will have to provide his/her password to issue system commands using sudo.


No comments: