How to Enable the Root User on Mac

Enable Root User Mac Featured Image

On macOS, certain parts of the file system are unavailable by default, even if you are the administrator. But if you enable the root user on your Mac, you’ll gain read and write privileges to the entire file system. You can even access files of another user’s account, which is perfect if you forget your username or password or an ex-employee leaves your business without sharing the login details for their company-issued macOS device. Follow this tutorial to learn how to enable the root user on macOS.

How to Enable Root User via the Terminal

You can enable root access via your Mac’s terminal.

  1. To launch the Terminal, either open a new Finder window and navigate to “Applications -> Utilities -> Terminal” or search for “terminal” using Spotlight.
Enable Root User Mac Terminal Finder
  1. In Terminal, type dsenableroot after the “%” symbol and press Enter.
Enable Root User Mac Terminal User Password
  1. Your username should come up. Enter your user password at the prompt and press Enter.
  2. Enter or create your root password and verify it.
  3. You should see a success message indicating that you have enabled the root user.
Enable Root User Mac Terminal Enabled

How to Enable Root User Using the Directory Utility

If you prefer to use a GUI-based option to enable the root user on your Mac, use the Directory Utility instead of the Terminal.

  1. Open your Mac’s Spotlight by clicking the menu bar icon in the upper-right corner of the screen or pressing Command + Space.
  2. Search for “directory utility” in the Spotlight window, then select the application when it appears.
Enable Root User Mac Spotlight Directory Utility
  1. Click on the lock icon in the bottom-left corner of the Directory Utility window.
Enable Root User Mac Directory Utility Lock
  1. Use Touch ID or type your Mac password when prompted.
  2. Click on “Edit” in the menu bar and select “Enable Root User” from the drop-down.
Enable Root User Mac Spotlight Directory Utility Edit
  1. A pop-up will appear requesting your root user password. Create or enter your root user password.
Enable Root User Mac Spotlight Directory Utility Root User Password
  1. Click “OK” or press Enter to enable the root user.

Note: you won’t get a prompt alerting you that the root user is enabled.

How to Log In as the Root User

Once it’s enabled, you can log in to the root account from the login screen.

  1. Log out of your current user account.
  2. Select “Other” on the login screen.
Enable Root User Mac Login Screen
  1. For “username,” enter your username or “root,” then enter the password you created for your root account.
  1. Log in to the account.

This account may look the same as a regular user account, but it’s now possible to access, edit, and even delete files that would typically be strictly off-limits, so tread carefully!

To avoid accidental damage to your Mac, you should only log in to the root account when you have a task that specifically requires root privileges.

How to Disable the Root User

To help protect your Mac from malicious activities, or even accidental damage, disable root as soon as it’s no longer required.

How to Disable the Root User Using Terminal

  1. Launch Terminal via Finder (“Applications -> Utilities”) or Spotlight.
  2. Enter the dsenableroot -d command and press Enter.
Enable Root User Mac Disable Terminal
  1. Enter the password for your current account. You should see a prompt letting you know that the root user has been disabled.

How to Disable the Root User Using Directory Utility

  1. Launch Directory Utility.
  2. Click on the lock icon in the bottom-left corner of the window and enter your user password or use Touch ID for authentication.
  3. Click on “Edit” in the menu bar, then select “Disable Root User.”
Enable Root User Mac Disable Directory Utility

Note: you don’t need the root account for most fixes. You can even fix a frozen Mac without root access.

How to Change the Root User Password

  1. Launch “System Preferences.”
  2. Go to “Users & Groups.”
Enable Root User Mac Change Password System Preferences Home
  1. Click on the lock icon, then enter the administrator name and password to gain access to the underlying settings.
  2. Click on “Login Options” in the sidebar.
Enable Root User Mac Change Password System Preferences Login Options
  1. Click the “Join” button next to “Network Account Server” in the pane on the right.
Enable Root User Mac Change Password System Preferences Login Options Join
  1. Click “Open Directory Utility” in the pop-up that appears.
Enable Root User Mac Change Password System Preferences Login Options Join Directory Utility
  1. Click on the lock icon in the Directory Utility window, then enter your user password or authenticate with Touch ID.
  2. From the menu bar in Directory Utility, choose “Edit,” then select “Change Root Password.”
Enable Root User Mac Change Password Directory Utility 1
  1. Enter a new root password when prompted.

Frequently Asked Questions

Can I change the username for the root user account?

No. The root account username is “root” by default on all macOS devices.

Can the password for my Mac and root user be the same?

If you want to set it that way, it’s possible. However, if you have someone else who knows your Mac’s password, they’ll also have access to your computer’s administrative privileges.

Is it safe to keep the root user enabled?

No. By enabling the root user, you’ll have full control over your Mac. While this can be handy for advanced users, it’s also far easier to damage your device or leave your Mac open to attacks. Apple is fully aware of this and has disabled root access by default. For safety, ‌disable the root user after performing administrative tasks on your Mac.

Image credit: markusspiske via Pixabay.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Natalie dela Vega

Natalie is a writer specializing in tech how-tos and gaming. When she's not writing, she plays PC games and travels. Here at MakeTechEasier, you will see her write about guides, tips, and solutions for Windows and iOS.