Check: APPL-14-003080
Apple macOS 14 (Sonoma) STIG:
APPL-14-003080
(in versions v1 r2 through v1 r1)
Title
The macOS system must disable accounts after 35 days of inactivity. (Cat II impact)
Discussion
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.
Check Content
Verify the macOS system is configured to disable accounts after 35 days of inactivity with the following command: /usr/bin/pwpolicy -getaccountpolicies 2> /dev/null | /usr/bin/tail +2 | /usr/bin/xmllint --xpath '//dict/key[text()="policyAttributeInactiveDays"]/following-sibling::integer[1]/text()' - If the result is not "35", this is a finding.
Fix Text
Configure the macOS system to disable accounts after 35 days of inactivity with the following command: 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": [source,xml] ---- <dict> <key>policyContent</key> <string>policyAttributeLastAuthenticationTime > policyAttributeCurrentTime - (policyAttributeInactiveDays * 24 * 60 * 60)</string> <key>policyIdentifier</key> <string>Inactive Account</string> <key>policyParameters</key> <dict> <key>policyAttributeInactiveDays</key> <integer>35</integer> </dict> </dict> ---- 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". [source,bash] ---- /usr/bin/pwpolicy setaccountpolicies $pwpolicy_file ---- Note: Refer to the password policy supplemental on more information on how to implement password policies on macOS.
Additional Identifiers
Rule ID: SV-259552r941278_rule
Vulnerability ID: V-259552
Group Title: SRG-OS-000118-GPOS-00060
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-000795 |
The organization manages information system identifiers by disabling the identifier after an organization-defined time period of inactivity. |
Controls
Number | Title |
---|---|
IA-4 |
Identifier Management |