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
license: mit |
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 |
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/Groups/git | |
sudo dscl localhost -create /Local/Default/Groups/git name git | |
sudo dscl localhost -create /Local/Default/Groups/git gid 90 |
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
#!/usr/bin/python | |
# import modules used here -- sys is a very standard one | |
import sys | |
# Gather our code in a main() function | |
def main(): | |
print 'Hello World', sys.argv[1] | |
# Command line args are in sys.argv[1], sys.argv[2] .. | |
# sys.argv[0] is the script name itself and can be ignored |