Table of Contents
Even if you are the administrator on macOS, you can’t get to some parts of the file system by default. But if you Enable Root User on Mac, you will be able to read and write to the whole file system. You can even look at the files of another user’s account, which is great if you forget your username or password or if a former employee leaves your company without giving you the login information for the macOS device they used at work. Follow this guide to find out how to turn on the root user on macOS.
For people who know how to use the Terminal and are comfortable with command line syntax, enabling the root user account in Mac OS X from the command line may be even easier than doing so from the Directory Utility app. This is because there are fewer steps needed to enable or disable the root user account for all users or just one user. This is also helpful because it can be turned on remotely on any Mac that can be connected to via SSH.
It’s very important to note that enabling the root user account is only for advanced users who know when and why it may be necessary to have universal superuser privileges. This is usually only needed by system administrators or when troubleshooting some very advanced and complicated problems. For most purposes, using sudo or launching a GUI app as root is usually enough for the vast majority of situations.
How to Enable Root User on Mac
- From the Apple menu, select System Preferences.
- Select Users & Groups.
- Click the lock icon and authenticate with an administrator account.
- Select Login Options.
- Click Join, as shown in the figure below.
- Click the Open Directory Utility button. The Directory Utility window appears.
- Click the lock icon and authenticate with an administrator account.
- From the Edit menu, select Enable Root User.
- Enter the password for the root user in the Password and Verify fields.
- Click OK to enable the root user and save the password.
Disabling the Root User Account
- From the Apple menu, select System Preferences.
- Select Users & Groups.
- Click the lock icon and authenticate with an administrator account.
- Select Login Options.
- Click Join, as shown in the figure below.
- Click Open Directory Utility. The Directory Utility window appears.
- Click the lock and authenticate with an administrator account.
- From the Edit menu, select Disable Root User. The root user is now disabled.
FAQs
The root user is disabled by default. Although you can enable it, it’s recommended that you avoid logging into a Mac as the root user, either locally or remotely. Instead, use the sudo command-line tool to perform tasks that require root user privileges.
To enable the root user, choose Edit > Enable Root User from the menu bar. Then enter the password that you want to use. You can then log in as the root user. To disable the root user, choose Edit > Disable Root User.
This error occurs when the user does not have the privileges to make edits to a file. Root has access to all files and folders and can make any edits. Other users, however, may not be allowed to make such edits. Remember that only root or users with Sudo privileges can change permissions for files and folders.