os_root_disable Disable Root Login
NIST macOS Security Compliance Project Tahoe Guidance, Revision 3.0 (cf656e8)
All changes in this version
All changes in this version
Title
Disable Root Login
Control
/usr/bin/dscl '/Local/Default' read '/Users/root' AuthenticationAuthority 2>/dev/null | /usr/bin/grep -c 'AuthenticationAuthority'
Discussion
To assure individual accountability and prevent unauthorized access, logging in as root at the login window _MUST_ be disabled.
The macOS system _MUST_ require individuals to be authenticated with an individual authenticator prior to using a group authenticator, and administrator users _MUST_ never log in directly as root.
Related controls
ia-2, ia-2.5
Fix
[source,bash]
----
/usr/bin/fdesetup remove -user root
/usr/bin/dscl '/Local/Default' delete '/Users/root' AuthenticationAuthority
----