Passwordless SU

1. Edit /etc/pam.d/su, after
Code:
auth sufficient /lib/security/pam_rootok.so
add
Code:
auth sufficient /lib/security/pam_listfile.so item=ruser \
onerr=fail sense=allow file=/etc/security/su-nopass

2. Create a /etc/security/su-nopass file, and it put one username per line. Only put users that you want to have access to root without a password.
3. Double check the permissions on the file, we don’t want it world writable, and world readable is a matter of personal preference.

Author: WladyX on 12 November, 2006
Category: General

Leave a Reply

Last articles