Skip to content

Instantly share code, notes, and snippets.

@aromig
Created September 11, 2015 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aromig/7b0b494d4fcbc94e749b to your computer and use it in GitHub Desktop.
Save aromig/7b0b494d4fcbc94e749b to your computer and use it in GitHub Desktop.
# Create a mobile account for a user
sudo /System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount -n <username>
# Delete a user's mobile account
sudo dscl . delete /Users/<username>
# List all AD accounts on machine
dscl . list /Users UniqueID | awk '$2 > 1000 { print $1 }'
# Enable/Disable mobile account support on machine
sudo dsconfigad -mobile <enable | disable>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment