SV-225127r610901_rule
V-225127
SRG-OS-000002-GPOS-00002
AOSX-15-000012
CAT II
10
This setting may be enforced using local policy or by a directory service.
To set local policy to disable a temporary or emergency user, create a plain text file containing the following:
<dict>
<key>policyCategoryAuthentication</key>
<array>
<dict>
<key>policyContent</key>
<string>policyAttributeCurrentTime < policyAttributeCreationTime+259299</string>
<key>policyIdentifier</key>
<string>Disable Tmp Accounts </string>
</dict>
</array>
</dict>
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" and the path to the file in place of "/path/to/file":
/usr/bin/sudo /usr/bin/pwpolicy -u username setaccountpolicies /path/to/file
Verify if a password policy is enforced by a directory service by asking the System Administrator (SA) or Information System Security Officer (ISSO).
If no policy is enforced by a directory service, a password policy can be set with the "pwpolicy" utility. The variable names may vary depending on how the policy was set.
If there are no temporary or emergency accounts defined on the system, this is Not Applicable.
To check if the password policy is configured to disable a temporary or emergency account after 72 hours, run the following command to output the password policy to the screen, substituting the correct user name in place of username:
/usr/bin/sudo /usr/bin/pwpolicy -u username getaccountpolicies | tail -n +2
If there is no output, and password policy is not controlled by a directory service, this is a finding.
Otherwise, look for the line "<key>policyCategoryAuthentication</key>".
In the array that follows, there should be a <dict> section that contains a check <string> that allows users to log in if "policyAttributeCurrentTime" is less than the result of adding "policyAttributeCreationTime" to 72 hours (259299 seconds). The check might use a variable defined in its "policyParameters" section.
If the check does not exist or if the check adds too great an amount of time to "policyAttributeCreationTime", this is a finding.
V-225127
False
AOSX-15-000012
Verify if a password policy is enforced by a directory service by asking the System Administrator (SA) or Information System Security Officer (ISSO).
If no policy is enforced by a directory service, a password policy can be set with the "pwpolicy" utility. The variable names may vary depending on how the policy was set.
If there are no temporary or emergency accounts defined on the system, this is Not Applicable.
To check if the password policy is configured to disable a temporary or emergency account after 72 hours, run the following command to output the password policy to the screen, substituting the correct user name in place of username:
/usr/bin/sudo /usr/bin/pwpolicy -u username getaccountpolicies | tail -n +2
If there is no output, and password policy is not controlled by a directory service, this is a finding.
Otherwise, look for the line "<key>policyCategoryAuthentication</key>".
In the array that follows, there should be a <dict> section that contains a check <string> that allows users to log in if "policyAttributeCurrentTime" is less than the result of adding "policyAttributeCreationTime" to 72 hours (259299 seconds). The check might use a variable defined in its "policyParameters" section.
If the check does not exist or if the check adds too great an amount of time to "policyAttributeCreationTime", this is a finding.
M
4212