AOSX-12-000110 - The OS X system must automatically remove or disable temporary user accounts after 72 hours.

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

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-12_V1R6_STIG.zip

Item Details

References: CAT|II, CCI|CCI-000016, Rule-ID|SV-90669r1_rule, STIG-ID|AOSX-12-000110, Vuln-ID|V-75981

Plugin: Unix

Control ID: 7780f5c5b9b753509693e27f05625bddab147eb5633dc258e86793697597f355