Skip to content

Instantly share code, notes, and snippets.

@kcrawford
Last active June 15, 2018 19:03
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kcrawford/5725057 to your computer and use it in GitHub Desktop.
Save kcrawford/5725057 to your computer and use it in GitHub Desktop.
active directory account and password one-liner OS X
account=`dsconfigad -show | awk '/Computer *Account/ { print $4 }'` \
&& printf "Account: ${account}\nPassword: \
`sudo security find-generic-password -a ${account} -w /Library/Keychains/System.keychain`\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment