Home > Software design >  su root failed on Mac
su root failed on Mac

Time:05-17

I tried to use the command "su root" on Mac OS Monterey version 12.3.1, but response was always Sorry, is there any possible reasons other than the wrong password?

I checked the link [ https://stackoverflow.com/questions/70699857/linux-shell-command-su-authentication-failed ] as this man did before. According to the specification, it says that [root and users in group wheel can run anything on any machine as any user], the belonging of me myself is wheel absolutely. See attached image. However, I did not succeed after trials.

enter image description here enter image description here

Thank you so much ! Best Regards, Juan K.N

CodePudding user response:

When you do su root, you need to input root password.

To become root, we usually do sudo su -, then input your own password.

CodePudding user response:

In macOS the root user is DISABLED by default. Also note, macOS is not Linux! You should really use sudo as @Philippe suggested.

If you want to enable the root user there are two methods:

  1. In a Terminal window:

    trev@macmini8 [/Users/trev] $ sudo su -
    Password:
    macmini8:~ root# passwd
    Changing password for root.
    New password:
    Retype new password:

  2. Choose Apple Menu (top left) > System Preferences
    Choose Users and Groups
    Click Login Options
    Click Join
    Click Open Directory Utility
    From the menu bar in Directory Utility
    ... Choose Edit > Enable Root User
    ... Enter the password that you want to use for root

  • Related