Last active
August 29, 2015 13:59
-
-
Save elgalu/10750605 to your computer and use it in GitHub Desktop.
Create OSX user and group with specific IDs to fix VMWare shared folders agains a Linux host
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
# Within Mac VM | |
sudo -s | |
# Create user with id 1000 and group with id 1000 | |
dscl . -create /Groups/mygroup | |
dscl . -create /Groups/mygroup name mygroup | |
dscl . -create /Groups/mygroup passwd "clave" | |
dscl . -create /Groups/mygroup gid 1000 | |
dscl . -create /Users/myuser | |
dscl . -create /Users/myuser UserShell /bin/bash | |
dscl . -create /Users/myuser RealName "myuser" | |
dscl . -create /Users/myuser UniqueID 1000 | |
dscl . -create /Users/myuser PrimaryGroupID 1000 | |
dscl . -create /Users/myuser NFSHomeDirectory /Users/myuser | |
dscl . -passwd /Users/myuser clave | |
dscl . -create /Groups/mygroup GroupMembership myuser | |
# Add user as sudoer | |
visudo | |
# Add this line: | |
myuser ALL=(ALL) ALL | |
# Now restart the Mac VM and login with the new user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment