HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

sudo priviledges in red hat linux

 
Beginner_2
Occasional Advisor

sudo priviledges in red hat linux

Hi,

Which file is used to give specific sudo privileges to particular user?

because when i do "sudo sh" on my system , i get extra privileges. which file i should look to get to know the concept of it

Thanks,
Rahul
1 REPLY
Matti_Kurkela
Honored Contributor

Re: sudo priviledges in red hat linux

When you run "sudo sh", it means you're running the "sh" using the identity and privileges of the root user.

You could instead do "sudo -u someuser sh" to run "sh" as user "someuser". If you don't use the -u option to specify the user you want, sudo assumes you're trying to run the command as root.

The sudo privileges are controlled by the sudoers file, typically located at /etc/sudoers in Linux. But you should never edit this file directly: you should use the "visudo" command instead.

The "visudo" command uses your favorite text editor (specified using environment variable EDITOR or VISUAL), or the vi editor if no favorite has been specified. It will make a temporary copy of the real sudoers file and allow you to edit the copy. Once you exit the editor, visudo will check the edited copy for syntax correctness; the real sudoers file will be replaced with the edited version only if the syntax is correct.

The "man" command can be used to get instructions about the use of each command and many configuration files; run "man sudo", "man sudoers" and "man visudo" to see information about sudo.

MK
MK