View Help: Man DSCL
Show all users: DSCL. List/users
Show all groups: sudo dscl. -list/groups groupmembership
Add user to Group:sudo DSCL. -append/groups/groupname groupmembership username
Remove user from Group:
sudo dscl. -delete/groups/groupname groupmembership username
View ID
DSCL. -read/users/root Primarygroupid
DSCL. -list/users UniqueID
DSCL. -list/groups Primarygroupid
Create a hidden user
sudo dscl. Create/groups/nginx Primarygroupid 390
sudo dscl. Create/users/nginx UniqueID 390
sudo dscl. Create/users/nginx Primarygroupid 390
sudo dscl. Create/users/nginx Usershell/bin/false
sudo dscl. Create/users/nginx realname Nginx
sudo dscl. Create/users/nginx Nfshomedirectory/dev/null
sudo dscl. Create/groups/nginx groupmembership Nginx
Http://www.ideawu.net/blog/archives/835.html
Http://www.l68.net/515.html
Http://www.cnblogs.com/whyandinside/archive/2012/04/21/2461483.html
Create hidden users under Mac