Mac下创建隐藏用户
查看帮助:man dscl
显示所有用户:dscl . list /users
显示所有组:sudo dscl . -list /groups GroupMembership
添加user到group:sudo dscl . -append /Groups/groupname GroupMembership username
从group中删除user:
sudo dscl . -delete /Groups/groupname GroupMembership username
查看ID
dscl . -read /Users/root PrimaryGroupID
dscl . -list /Users UniqueID
dscl . -list /Groups PrimaryGroupID
创建隐藏用户
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
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。