Created
April 10, 2014 17:32
-
-
Save gambl/10404847 to your computer and use it in GitHub Desktop.
OSX : dscl : create user
This file contains hidden or 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
sudo dscl localhost -create /Local/Default/Users/git | |
#This won't actually check if the Unique ID is actually unique | |
sudo dscl localhost -create /Local/Default/Users/git UniqueID 90 | |
sudo dscl localhost -create /Local/Default/Users/git UserShell /usr/bin/git-shell | |
sudo dscl localhost -create /Local/Default/Users/git RealName git | |
sudo dscl localhost -create /Local/Default/Users/git NFSHomeDirectory /Users/git | |
sudo dscl localhost -create /Local/Default/Users/git PrimaryGroupID 90 | |
sudo dscl localhost -create /Local/Default/Users/git Password '*' | |
#give the user remote ssh access | |
sudo dscl localhost -append /Local/Default/Groups/com.apple.access_ssh GroupMembership git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment