Created
July 16, 2013 14:22
-
-
Save pmbuko/6009186 to your computer and use it in GitHub Desktop.
Add to your .bashrc. Works on an AD-bound mac with directory search path set up properly. 'getsid [username]' will return the user's SID.
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
getsid () { dscl localhost -read /Search/Users/$1 SMBSID 2>/dev/null | awk '{print $2}'; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment