5.2.1 Ensure Password Account Lockout Threshold Is Configured

Information

The account lockout threshold specifies the amount of times a user can enter an incorrect password before a lockout will occur.

Ensure that a lockout threshold is part of the password policy on the computer.

Rationale:

The account lockout feature mitigates brute-force password attacks on the system.

Impact:

The number of incorrect log on attempts should be reasonably small to minimize the possibility of a successful password attack, while allowing for honest errors made during a normal user log on.

The locked account will auto-unlock after a few minutes when bad password attempts stop. The computer will accept the still-valid password if remembered or recovered.

Solution

Perform the following to enable Password Account Thresholds to less than or equal to 5:
Terminal Method:
Run the following command to set the maximum number of failed login attempts to less than or equal to 5:

$ sudo /usr/bin/pwpolicy -n /Local/Default -setglobalpolicy 'maxFailedLoginAttempts=<value<=5>'

example:

$ sudo /usr/bin/pwpolicy -n /Local/Default -setglobalpolicy 'maxFailedLoginAttempts=5'

Profile Method:

Create or edit a configuration profile with the PayLoadType of com.apple.mobiledevice.passwordpolicy

Add the key maxFailedAttempts

Set the key to '<value<=5>

See Also

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