krispayne / CIS-Settings

CIS settings bootstrapper for Mac
MIT License
32 stars 5 forks source link

TODO: 5.7 Do not enable the "root" account #19

Open krispayne opened 8 years ago

krispayne commented 8 years ago
#5.7 Do not enable the "root" account
# Level 1 Scored
#TODO: Test. New audit/remediation written.
# this is requiring expected statements. will look into expect
if [[ "$(/usr/bin/dscl . -read /Users/root AuthenticationAuthority)" = "No such key: AuthenticationAuthority" ]]; then
    ScriptLogging "  Root user is disabled."
else
    ScriptLogging "  Root user is enabled. Disabling..."
    /usr/sbin/dsenableroot -d
    ScriptLogging "  Root user is disabled."
fi