LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   How do I add myself to the sudoers list? (http://www.linuxquestions.org/questions/debian-26/how-do-i-add-myself-to-the-sudoers-list-821947/)

Cultist 07-24-2010 06:07 PM

How do I add myself to the 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?

the trooper 07-24-2010 06:24 PM

Any reason you can't use su?.
There's nothing wrong with using sudo,personally I just don't like Ubuntu's interpretation of sudo use.

Cultist 07-24-2010 06:32 PM

not really, I'm just sick of being told I'm not in the sudoers list.

craigevil 07-24-2010 07:25 PM

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

hoodooman 07-24-2010 08:41 PM

can you edit /etc/sudoers and and yourself e.g through group wheel?.Thats what I do on slackware,don't know if its different on your system.

bullium 07-25-2010 08:29 AM

Quote:

Originally Posted by hoodooman (Post 4044364)
can you edit /etc/sudoers and and yourself e.g through group wheel?.Thats what I do on slackware,don't know if its different on your system.

To edit the sudoers file you should use the command "visudo". You should never edit that file by hand.

tonyfreeman 07-26-2010 07:31 PM

visudo or add self to sudo group
 
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 (tony) to this group:

Code:

su -
usermod -a -G sudo tony

The 'tony' user will have to provide his/her password to issue system commands using sudo.


All times are GMT -5. The time now is 09:01 AM.