How to Set Yourself as Super User (Sudoer)

Linux OS Topics
Post Reply
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

How to Set Yourself as Super User (Sudoer)

Post by Saman » Tue Oct 06, 2009 3:21 pm

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 aliases 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 :

Code: Select all

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

Some other examples could be:

Code: Select all

User_Alias PEOPLE = clare,kalvin

PEOPLE ALL=ALL

#The users in the PEOPLE group can run any command from any terminal.
Another example could be :

Code: Select all

gregory ALL= PRINTING

# user gregory may run lpc and lprm from any machine.
Post Reply

Return to “Linux”