Skip to content

Instantly share code, notes, and snippets.

@aromig
Last active April 19, 2016 12:37
Show Gist options
  • Save aromig/f8b07b21e61e0242039f to your computer and use it in GitHub Desktop.
Save aromig/f8b07b21e61e0242039f to your computer and use it in GitHub Desktop.
# Bind to AD
sudo dsconfigad -a <computername> -u <username> -ou "" -domain <domain>
# Unbind from AD
# Can use a bogus username and password here
sudo dsconfigad -force -remove -u user -p pass
# Manually create a user profile for an AD user
sudo /System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount -n <username>
sudo createhomedir -c -u <username>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment