Skip to content

Commit

Permalink
Merge pull request #431 from joubbi/pwhistory
Browse files Browse the repository at this point in the history
Use pam_pwhistory.so instead of pam_unix.so for remembering old passwords
  • Loading branch information
schurzi authored Mar 23, 2021
2 parents 05bc809 + d693a8e commit a45eee2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions roles/os_hardening/templates/etc/pam.d/rhel_auth.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ account [default=bad success=ok user_unknown=ignore] pam_sss.so
account required pam_permit.so

{% if (os_auth_pam_passwdqc_enable | bool) %}
password required pam_pwquality.so {{ os_auth_pam_pwquality_options }}
password requisite pam_pwquality.so {{ os_auth_pam_pwquality_options }}
{% endif %}
{# NSA 2.3.3.5 Upgrade Password Hashing Algorithm to SHA-512 #}
{# NSA 2.3.3.6 Limit Password Reuse #}
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok remember=5
password requisite pam_pwhistory.so remember=5 use_authtok
{# NSA 2.3.3.5 Upgrade Password Hashing Algorithm to SHA-512 #}
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
{% if (os_auth_pam_sssd_enable | bool) %}
password sufficient pam_sss.so use_authtok
{% endif %}
Expand Down

0 comments on commit a45eee2

Please sign in to comment.