My user account is a standard account on my Mac. What must I enter into Terminal using sudo
, to make myself the administrator?
MacOS – What must I enter into Terminal, using sudo to make theself an administrator
administratormacosterminaluser-account
Related Question
- macOS – Standard User vs Admin Account Best Practices
- How to prevent a user to use admin rights to work around restrictions
- MacOS – Using Command Line how to make the user an Administrator
- MacOS – User account no longer in ‘admin’, how to recover
- MacOS: Setting up an administrative account from a user account without admin password
- macOS Catalina – How to Make an Account Standard
- MacOS – Can malware skip the administrator password popup if it already knows the password on macOS
Best Answer
If the actual user < user_name > has a standard account, you would have to enter
to make < user_name > an admin.
Only a restricted number of users are sudoers (i.e. accounts which are allowed to run
su
orsudo
with root privileges successfully) though. The standard sudoers file (/etc/sudoers) in OS X looks like this:So only root and members of the admin group are allowed to run
sudo
by default. The above command run by < user_name > will fail consequently, because < user_name > isn't in the list.To enable sudoing for < user_name >, you would have to add < user_name > to the list (below # User privilege specification) or uncomment the %wheel line with
sudo visudo
which has to be run by sudoers again (that's the Catch22 mentioned by Tetsujin).