Rule ID
SV-288965r1316392_rule
Version
V1R1
CCIs
The macOS must be configured to require that a minimum of 14 characters be used when a password is created. This rule enforces password complexity by requiring users to set passwords that are less vulnerable to malicious users. Note: The guidance for password-based authentication in National Institute of Standards and Technology (NIST) Special Publication (SP) 800-53 (Rev 5) and NIST SP 800-63B states that complexity rules must be organizationally defined. The values defined are based on common complexity values, but each organization may define its own password complexity rules.
Verify the macOS system is configured to enforce a minimum 14-character password length with the following command:
/usr/bin/pwpolicy -getaccountpolicies 2>/dev/null | tail +2 | grep -oE "policyAttributePassword matches '.\{[0-9]+," | awk -F'[{,]' -v ODV=14 '{if ($2 > max) max=$2} END {print (max >= ODV) ? "pass" : "fail"}'
If the result is not "true", this is a finding.Configure the macOS system to enforce a 14-character password length by installing the "com.apple.mobiledevice.passwordpolicy" configuration profile.