Fill these in once
- Create an admin userNeeds sudo
sudo sysadminctl -addUser alex -fullName "alex" -password - -adminIt asks you to type the new user's password.
- List users
dscl . list /Users | grep -v '^_'
- Create the userNeeds sudo
sudo adduser alexIt asks for a password and a few optional details.
- Give them sudoNeeds sudo
sudo usermod -aG sudo alex - List users
getent passwd | cut -d: -f1
- Create the userRun as administrator
New-LocalUser -Name alex -Password (Read-Host -AsSecureString "Password") - Make them an administratorRun as administrator
Add-LocalGroupMember -Group Administrators -Member alex - List users
Get-LocalUser