How To Restrict Access To Su Command

RegisterLogin
How To Restrict Access To Su Command
Post Description: if you are reading this topic its probably because you want to disable or restrict access to a user for using the su command to gain access to the superuser account. i will show you what file you need to edit
Tags: how, to, restrict, access, to, su, command
This Post Was Posted On Mar 31, 2010 By Webune Support #3316
if you are reading this topic its probably because you want to disable or restrict access to a user for using the su command to gain access to the superuser account. i will show you what file you need to edit.

the file you will need to edit is the /etc/pam.d/su

you can find the file by listing all the file in the /etc/pam.d/ directory:

# ls /etc/pam.d/

there, you will see the su file, you can edit using your favorite text editor. (like VI for example) i like to use nano instead so you can send this command to edit the su file

# nano /etc/pam.d/su
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
webune
#3683 1
this is what a tipical su file looks like:
#%PAM-1.0
auth            sufficient      pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth           sufficient      pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth           required        pam_wheel.so use_uid
auth            include         system-auth
account         sufficient      pam_succeed_if.so uid = 0 use_uid quiet
account         include         system-auth
password        include         system-auth
session         include         system-auth
session         optional        pam_xauth.so
Mar 31, 2010 Reply Report abuse
©2012 Webune Forums - Thu Dec 13, 2012 3:42 am
Powered by: Webune Forums V3