Catalina - Disable Accounts after 35 Days of Inactivity


The macOS _MUST_ be configured to disable accounts after 35 days of inactivity.

This rule prevents malicious users from making use of unused accounts to gain access to the system while avoiding detection.


This setting may be enforced using local policy or by a directory service.

To set local policy to disable an inactive user after 35 days, edit the current password policy to contain the following <dict> within the "policyCategoryAuthentication":

<string>policyAttributeLastAuthenticationTime &gt; policyAttributeCurrentTime - (policyAttributeInactiveDays * 24 * 60 * 60)</string>
<string>Inactive Account</string>
After saving the file and exiting to the command prompt, run the following command to load the new policy file, substituting the path to the file in place of "$pwpolicy_file".

/usr/bin/pwpolicy setaccountpolicies $pwpolicy_file
WARNING: This may not function properly in macOS Catalina versions prior to 10.15.7.

NOTE: See the password policy supplemental on more information on how to implement password policies on macOS.

See Also

Item Details


References: 800-53|AC-2(3), 800-53|IA-4, 800-53|IA-4e., CCE|CCE-84808-5, CCI|CCI-000795

Plugin: Unix

Control ID: 94fd804bf0c8fcb6d1b92eb18191e3862f87f5aeb2b0b212928e10baed21d241