📜  如何在 mac 中从 bash 添加用户 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:31.957000             🧑  作者: Mango

代码示例1
dscl . -create /Users/joeadmin
dscl . -create /Users/joeadmin UserShell /bin/bash
dscl . -create /Users/joeadmin RealName "Joe Admin" 
dscl . -create /Users/joeadmin UniqueID "510"
dscl . -create /Users/joeadmin PrimaryGroupID 20
dscl . -create /Users/joeadmin NFSHomeDirectory /Users/joeadmin
dscl . -passwd /Users/joeadmin password 

dscl . -append /Groups/admin GroupMembership joeadmin