Su
lastmod 2020-11-18created 2020-11-183 edits
How to restrict the su command for the root account
Use pam_wheel (Linux PAM) to restrict the su command so that only wheel users can access it.
Add or modify the following in the /etc/pam.d/su file:
Add users to the wheel group. You can do this by editing the /etc/group file.
Change the permissions so that ordinary users cannot use the su command and only users in the wheel group can.
See also
- Linux
- InformationSecurity:CheckList:Unix - Checklist of security items for Unix-like systems.
- sudo