dscl . -create /Users/username
dscl . -create /Users/username UserShell /usr/bin/false
dscl . -create /Users/username RealName "User description"
dscl . -create /Users/username UniqueID ###
dscl . -create /Users/username PrimaryGroupID ###
dscl . -create /Users/username NFSHomeDirectory /dev/null
dscl . -passwd /Users/username PASSWORD
view users' full configs:
dscacheutil -q user
view particular user's full config:
dscacheutil -q user -a name username
view user's uid only:
dscl . list /Users uid
view group's gid only:
dscl . list groups gid
No comments:
Post a Comment