Can't enable root user

Hey.

I have couple problems with my macOS.

1) I'm not able to use sudo:

➜  ~ sudo vi
Password:
Sorry, user peter is not allowed to execute '/usr/bin/vi' as root on Peters-MacBook-Pro.local.
➜  ~


2) Can't enable root user. Directory Utility -> Edit -> Enable root user -> Enter root password -> Confirm root password -> OK.

root still disabled.

The button "Enable root user" still available. "Change root password" - disabled. Login via root - failed.


Tried to enable and disable SIP. No updates.

Mac Pro

Posted on Apr 20, 2020 6:05 AM

Reply
13 replies

Apr 20, 2020 6:24 AM in response to peter_iglaev

Only admin users can use sudo.

It seems that your account is not an admin account.

If this is your mac and you decided to make your regular account a standard account, you must have a separate account with admin privileges.

You can use it to grant admin privileges to your normal account.

Or you can do the sudo in two steps.

I will call the admin account "admin"; adjust accordingly.

Do

su admin


and type admin's password to run a shell as user admin.

Then you can use sudo.


There is NO reason to activate the root user in macOS.

You can do any administrative tasks without logging in as root.

Apr 20, 2020 7:31 AM in response to peter_iglaev

peter_iglaev wrote:

Hey.
I have couple problems with my macOS.
1) I'm not able to use sudo:
➜ ~ sudo vi
Password:
Sorry, user peter is not allowed to execute '/usr/bin/vi' as root on Peters-MacBook-Pro.local.
➜ ~

2) Can't enable root user. Directory Utility -> Edit -> Enable root user -> Enter root password -> Confirm root password -> OK.
root still disabled.
The button "Enable root user" still available. "Change root password" - disabled. Login via root - failed.

Tried to enable and disable SIP. No updates.



Use command-line text editors in Terminal on Mac - Apple ...


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can't enable root user

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.