Skip to content

Instantly share code, notes, and snippets.

@patgmac
Created November 28, 2017 21:31
Show Gist options
  • Save patgmac/0a176f26f6d71d282258acb6de47d496 to your computer and use it in GitHub Desktop.
Save patgmac/0a176f26f6d71d282258acb6de47d496 to your computer and use it in GitHub Desktop.
#!/bin/bash
# check_root_shell.sh
shell="$(/usr/bin/dscl . -read /Users/root UserShell)"
if [[ "$shell" == *"false"* ]]; then
echo "<result>Yes</result>"
else
echo "<result>No</result>"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment