5.4.4 Ensure password reuse is limited

Information

The /etc/security/opasswd file stores the users' old passwords and can be checked to ensure that users are not recycling recent passwords.

Note: Additional module options may be set, recommendation only covers those listed here.

Forcing users not to reuse their past 5 passwords make it less likely that an attacker will be able to guess the password.

Solution

Edit both the /etc/pam.d/password-auth and /etc/pam.d/system-auth files to include the remember option and conform to site policy as shown:

Note:

Add or modify the line containing the pam_pwhistory.so after the first occurrence of password requisite :

password required pam_pwhistory.so remember=5

Example: ( Second line is modified )

password requisite pam_pwquality.so try_first_pass local_users_only authtok_type=
password required pam_pwhistory.so use_authtok remember=5 retry=3
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password required pam_deny.so

See Also

https://workbench.cisecurity.org/benchmarks/8415

Item Details

Category: IDENTIFICATION AND AUTHENTICATION

References: 800-53|IA-5(1), CSCv7|16

Plugin: Unix

Control ID: 8ef2452b4bbb61b1736886d1df0040b6fdbca4f1ae15253d431bbab2d06242ce