Created
July 29, 2015 20:40
-
-
Save cshepp1211/38f9ba90a4fa6e2257e6 to your computer and use it in GitHub Desktop.
is-root-enabled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rootCheck=`dscl . read /Users/root | grep AuthenticationAuthority 2>&1 > /dev/null ; echo $?` | |
if [ "${rootCheck}" == 1 ]; then | |
echo "<result>Disabled</result>" | |
else | |
echo "<result>Enabled</result>" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment