Using Command Line how to make the user an Administrator
sudo dscl . -merge /Groups/admin GroupMembership username
where ‘username’ is the username of the user you would like to make an admin.
sudo
since making changes like this requires elevated privileges.dscl
is the Directory Service command line utility..
is the local machine.-merge
allows you to add a new key to a record path./Groups/admin
is the record path for the key.GroupMembership
is the key you would like to assign a value.username
is the value for the key.