Skip to main content

Create User

Set the username and password

dscl . -passwd /Users/<username> <password>

 

Set the user's default shell

dscl . -create /Users/<username> UserShell /bin/bash

 

Set the user's display name

dscl . -create /Users/<username> RealName "Real Name"

 

Set the user's primary group

dscl . -create /Users/<username> PrimaryGroupID 1000

 

Set the user's home directory

dscl . -create /Users/<username> NFSHomeDirectory /Users/<username>

 

Promote user to local admin

dscl . -append /Groups/admin GroupMembership <username>

 

Set the user's ID

dscl . -create /Users/<username> UniqueID 510