Skip to content

Instantly share code, notes, and snippets.

@viz3
Created June 19, 2012 12:24
Show Gist options
  • Save viz3/2953847 to your computer and use it in GitHub Desktop.
Save viz3/2953847 to your computer and use it in GitHub Desktop.
change uid and gid on lion
#!/bin/sh
user="viz"
group="$user"
current_uid="502"
uid="60001"
gid="$uid"
dscl . -create /Groups/$group PrimaryGroupID $gid
dscl . -create /Users/$user UniqueID $uid
dscl . -create /Users/$user PrimaryGroupID $gid
find / -user $current_uid | xargs chown -R $uid:$gid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment