Skip to content

Instantly share code, notes, and snippets.

@centminmod
Last active August 29, 2015 13:57
Show Gist options
  • Save centminmod/9488942 to your computer and use it in GitHub Desktop.
Save centminmod/9488942 to your computer and use it in GitHub Desktop.
/etc/pam.d/system-auth default centos 6.5 https://www.digitalocean.com/community/articles/how-to-set-password-policy-on-a-centos-6-vps changed from default minimum of 2 upper case + 2 lower case + 2 numbers + 2 symbols for passwords and deny reusing the last 5 passwords
#%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 sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 500 quiet
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 500 quiet
account required pam_permit.so
password requisite pam_cracklib.so try_first_pass retry=3 type= ucredit=-2 lcredit=-2 dcredit=-2 ocredit=-2
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok remember=5
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment