Skip to content

Instantly share code, notes, and snippets.

@kcrawford

kcrawford/gist:5725057

Last active Jun 15, 2018
Embed
What would you like to do?
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