Friday, June 25, 2010

Linux Hardening - Password



#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth required pam_unix.so nullok try_first_pass
#Deny 5 failed logins and lockout for 30 minutes
auth required pam_tally2.so deny=5 onerr=fail unlock_time=1800

account required pam_unix.so
account sufficient pam_succeed_if.so uid <>
account required pam_permit.so
#Don't forget this line
account required pam_tally2.so

#Password Complexity.Please read pam_passwdqc for options
password requisite pam_passwdqc.so min=disabled,disabled,disabled,12,8
#Password History. User cannot use 4 previous passwords
password sufficient pam_unix.so md5 shadow nullok use_authtok remember=4
password required pam_deny.so

session optional pam_keyinit.so revoke
session required pam_limits.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so

No comments:

Post a Comment