0
Posted September 29, 2009 by Spyros in Linux Tips
 
 

SuperUser Do(sudo) – How to Set Yourself as a Sudoer

talkavatar
talkavatar

Sudo, is a program that allows a system user to execute commands like he/she was the administrator of the system. By default, the only user of the system that is allowed to use sudo, is the root user, also called superuser. However, there is the file /etc/sudoers inside which we can add the users of the system that we allow them to use sudo.

There are alliases and more that you can use in order to determine groups of users and such, but the basic and classic usage is just to give sudo rights to a user, something that can be achieved using this line inside the /etc/sudoers file :

ForTheWin  ALL = (ALL) ALL

This command gives the system user ForTheWin, the right to execute everything on the machine as any user(including root).

Some other examples could be:

User_Aliias PEOPLE = eve,steve

PEOPLE ALL=ALL

#The users in the PEOPLE group can run any command from any terminal.

Another example could be :

john ALL= PRINTING

# user john may run lpc and lprm from any machine.

You can find more info at http://www.go2linux.org/sudoers-man-page


Spyros