HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: How to prevent su to root?
Operating System - Linux
1827809
Members
1935
Online
109969
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-21-2006 05:06 AM
03-21-2006 05:06 AM
How to prevent su to root?
I've installed sudo and sudoscripting on my RHEL AS3 implementation. I would now like to prevent everyone from su"ing" to the root user. I'd prefer that all use the "ss -u root" command as it will provide a much better audit trail. Can anyone point me in the direction of how I can prevent su to root. Thanks
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 06:03 AM
03-21-2006 06:03 AM
Re: How to prevent su to root?
Edit the su file (vi /etc/pam.d/su) and add the following line to the top of the file:
auth required /lib/security/Pam_wheel.so group=wheel
Which means only members of the "wheel" group can su to root. You can add the users to the group wheel so that only those users will be allowed to su as root.
Regards
auth required /lib/security/Pam_wheel.so group=wheel
Which means only members of the "wheel" group can su to root. You can add the users to the group wheel so that only those users will be allowed to su as root.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 06:04 AM
03-21-2006 06:04 AM
Re: How to prevent su to root?
Nobody that does not know the root password wont be able to su to root using the su command. You can also restrict further by using pam_wheel.so module. Edit /etc/pam.d/su:
auth required /lib/security/$ISA/pam_wheel.so use_uid
Only members of the wheel group will be able to use su.
To avoid su to root using sudo, configure something like this:
SUCMD = !/usr/bin/su*root*, /usr/bin/su
auth required /lib/security/$ISA/pam_wheel.so use_uid
Only members of the wheel group will be able to use su.
To avoid su to root using sudo, configure something like this:
SUCMD = !/usr/bin/su*root*, /usr/bin/su
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 09:05 AM
03-21-2006 09:05 AM
Re: How to prevent su to root?
Shalom,
The pam file above can be used to preven root from using su to other users without password authentication.
That's the best you can do.
SEP
The pam file above can be used to preven root from using su to other users without password authentication.
That's the best you can do.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
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