5.4.13 Ensure lockout for unsuccessful root logon attempts

Information

The operating system must lock the associated account after three unsuccessful root logon attempts are made within a 15-minute period.

Rationale:

By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute forcing, is reduced. Limits are imposed by locking the account.

Satisfies: SRG-OS-000329-GPOS-00128, SRG-OS-000021-GPOS-00005

Solution

To configure the operating system to lock automatically the root account until the locked account is released by an administrator when 3 unsuccessful logon attempts in 15 minutes are made.
Modify the first 3 lines of the auth section and the first line of the account section of the /etc/pam.d/system-auth and /etc/pam.d/password-auth files to match the following lines:
Example: vim /etc/pam.d/system-auth
Add, uncomment or update the following lines in each file:

auth required pam_faillock.so preauth silent audit deny=3 even_deny_root fail_interval=900 unlock_time=900
auth sufficient pam_unix.so try_first_pass
auth [default=die] pam_faillock.so authfail audit deny=3 even_deny_root fail_interval=900 unlock_time=900
account required pam_faillock.so

See Also

https://workbench.cisecurity.org/files/3636

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-7b., CCI|CCI-002238, CSCv6|16.7, CSCv7|16.7, Rule-ID|SV-204428r603261_rule, STIG-ID|RHEL-07-010330

Plugin: Unix

Control ID: ae7984d284df3901663c35805f6a6192d84a8ee8c97c7299ddd2412a3d125d21