Created
June 19, 2012 12:24
-
-
Save viz3/2953847 to your computer and use it in GitHub Desktop.
change uid and gid on lion
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
#!/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