AOSX-13-000110 - The macOS system must automatically remove or disable temporary user accounts after 72 hours.

Information

If temporary user accounts remain active when no longer needed or for an excessive period, these accounts may be targeted by attackers to gain unauthorized access. To mitigate this risk, automated termination of all temporary accounts must be set upon account creation.

Temporary accounts are established as part of normal account activation procedures when there is a need for short-term accounts without the demand for immediacy in account activation.

If temporary accounts are used, the operating system must be configured to automatically terminate these types of accounts after a DoD-defined time period of 72 hours.

To address access requirements, many operating systems may be integrated with enterprise-level authentication/access mechanisms that meet or exceed access control policy requirements.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.

Solution

This setting may be enforced using a configuration profile or by a directory service.

To set the password policy without a configuration profile, run the following command to save a copy of the current policy file, substituting the correct user name in place of 'username':

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

Open the resulting password policy file in a text editor.

If other policy settings are present, and the line '<key>policyCategoryAuthentication</key>' already exists, insert the following text after the <array> tag that immediately follows it:

<dict>
<key>policyContent</key>
<string>policyAttributeCurrentTime < policyAttributeCreationTime + 259299</string>
<key>policyIdentifier</key>
<string>Disable Temporary Account</string>
</dict>

At a minimum, edit the file to ensure that it contains the following text:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC '-//Apple//DTD PLIST 1.0//EN' 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'>
<plist version='1.0'>
<dict>
<key>policyCategoryAuthentication</key>
<array>
<dict>
<key>policyContent</key>
<string>policyAttributeCurrentTime < policyAttributeCreationTime + 259299</string>
<key>policyIdentifier</key>
<string>Disable Temporary Account</string>
</dict>
</array>
</dict>
</plist>

After saving the file and exiting to the command prompt, run the following command to load the new policy file, substituting the correct user name in place of 'username':

/usr/bin/sudo /usr/bin/pwpolicy -u username setaccountpolicies pwpolicy.plist

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Apple_OS_X_10-13_V2R5_STIG.zip

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-2(2), CAT|II, CCI|CCI-000016, Rule-ID|SV-214820r609363_rule, STIG-ID|AOSX-13-000110, STIG-Legacy|SV-96215, STIG-Legacy|V-81501, Vuln-ID|V-214820

Plugin: Unix

Control ID: c82527f8588bbcdd5683f64910d8e27f9d3cc87862de48b7d736e1a02ae0cdeb