os_root_disable Disable Root Login
NIST macOS Security Compliance Project Sequoia Guidance, Revision 4.0 (be5491f)
All changes in this version
All changes in this version
Title
Disable Root Login
Control
/usr/bin/dscl . -read /Users/root UserShell 2>&1 | /usr/bin/grep -c "/usr/bin/false"
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/dscl . -create /Users/root UserShell /usr/bin/false
----