HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- sudo priviledges in red hat linux
Operating System - Linux
1828270
Members
3442
Online
109975
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2011 02:48 AM
03-23-2011 02:48 AM
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
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 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2011 03:59 AM
03-23-2011 03:59 AM
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
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
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP