Create User in OSX Terminal Why you might do this then How?

Why I might do this?

How you do this?

dscl .
sudo dscl .
cd /Users
create user-2
create user-2 UserShell /bin/zsh
create user-2 PrimaryGroupID 20
create user-2 NFSHomeDirectory /Users/user-2
create user-2 UniqueID 502
passwd user-2
sudo mkdir /Users/user-2
sudo chome user-2:staff /Users/user-2
dscl . read /Groups/staff

Check your login

su user-2

Allow SSH Login

sudo dscl . append /Groups/ GroupMembership <your_user_name>

Issues I found

sudo dscl . -change /Users/user-2 UniqueID 503 504<main> attribute status: eDSPermissionError                                                                                                                                                           <dscl_cmd> DS Error: -14120 (eDSPermissionError)



Co-founder and Coder at work !

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store