1. Home
  2. Security Hardening
  3. DISA STIG Apple Mac OSX 10 14 V2R5
  4. AOSX-14-000022 – The macOS system must enforce the limit of three consecutive invalid logon attempts by a user before the user account is locked.

AOSX-14-000022 – The macOS system must enforce the limit of three consecutive invalid logon attempts by a user before the user account is locked.

Details

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.

Solution

This setting may be enforced using the ‘Passcode Policy’ configuration profile or by a directory service.

To set the passcode policy without a configuration profile, run the following command to save a copy of the current ‘pwpolicy’ account policy file:

/usr/bin/sudo /usr/bin/pwpolicy getaccountpolicies | tail -n +2 > pwpolicy.plist

Open the generated file in a text editor and ensure it contains the following text after the opening tag and before the closing tag.

Replace first with if necessary.

policyCategoryAuthentication


policyContent
(policyAttributeFailedAuthentications < policyAttributeMaximumFailedAuthentications) OR (policyAttributeCurrentTime > (policyAttributeLastFailedAuthenticationTime + autoEnableInSeconds))
policyIdentifier
Authentication Lockout
policyParameters

autoEnableInSeconds
900
policyAttributeMaximumFailedAuthentications
3


If the line ‘policyCategoryAuthentication‘ already exists, the following text should be used instead and inserted after the first tag that follows it:


policyContent
(policyAttributeFailedAuthentications < policyAttributeMaximumFailedAuthentications) OR (policyAttributeCurrentTime > (policyAttributeLastFailedAuthenticationTime + autoEnableInSeconds))
policyIdentifier
Authentication Lockout
policyParameters

autoEnableInSeconds
900
policyAttributeMaximumFailedAuthentications
3

After saving the file and exiting to the command prompt, run the following command to load the new policy file:

/usr/bin/sudo /usr/bin/pwpolicy setaccountpolicies pwpolicy.plist

Note: Updates to passcode restrictions must be thoroughly evaluated in a test environment. Mistakes in configuration or bugs in OS X may block password change and local user creation operations, as well as lock out all local users, including administrators.

Supportive Information

The following resource is also helpful.

This security hardening control applies to the following category of controls within NIST 800-53: Access Control.This control applies to the following type of system Unix.

References

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles