4.5.2 Ensure lockout for failed password attempts is configured

Information

Lock out users after n unsuccessful consecutive login attempts.

deny=<n> - Number of attempts before the account is locked

unlock_time=<n> - Time in seconds before the account is unlocked

Note: The maximum configurable value for unlock_time is 604800

Rationale:

Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems.

Impact:

Use of unlock_time=0 may allow an attacker to cause denial of service to legitimate users.

Solution

Set password lockouts and unlock times to conform to site policy. deny should be greater than 0 and no greater than 5. unlock_time should be 0 (never), or 900 seconds or greater.
Edit /etc/security/faillock.conf and update or add the following lines:

deny = 5
unlock_time = 900

Default Value:

deny = 3

unlock_time = 600

See Also

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