PAM and su behavior
2008-03-05 01:57:57 GMT
Hello, I'm experiencing unexpected PAM behavior under RHEL4.6 (pam-0.77-66.23). When I su to an account as a non-root user, the login failure counter is always updated for the account being su'd to, even when the su is successful. /etc/pam.d/su: #%PAM-1.0 auth sufficient /lib/security/$ISA/pam_rootok.so # Uncomment the following line to implicitly trust users in the "wheel" group. #auth sufficient /lib/security/$ISA/pam_wheel.so trust use_uid # Uncomment the following line to require a user to be in the "wheel" group. #auth required /lib/security/$ISA/pam_wheel.so use_uid auth required /lib/security/$ISA/pam_stack.so service=system-auth account sufficient /lib/security/$ISA/pam_succeed_if.so uid=0 use_uid quiet account required /lib/security/$ISA/pam_stack.so service=system-auth password required /lib/security/$ISA/pam_stack.so service=system-auth # pam_selinux.so close must be first session rule session required /lib/security/$ISA/pam_selinux.so close(Continue reading)
Another couple of pieces to the puzzle:
1) This behavior seems to have begun after
our last update cycle (Feb '08)
2) I can fix the problem with the "su" file
from RH AS 3:
auth sufficient /lib/security/$ISA/pam_rootok.so
# Uncomment the following line to implicitly trust users in
the "wheel" group.
#auth sufficient /lib/security/$ISA/pam_wheel.so trust
use_uid
# Uncomment the following line to require a user to be in the
"wheel" group.
#auth required /lib/security/$ISA/pam_wheel.so
use_uid
auth required /lib/security/$ISA/pam_stack.so
service=system-auth
account required /lib/security/$ISA/pam_stack.so
service=system-auth
password required /lib/security/$ISA/pam_stack.so
service=system-auth
session required /lib/security/$ISA/pam_stack.so
service=system-auth
session optional /lib/security/$ISA/pam_xauth.so
With this file in place, su behaves as expected:
RSS Feed