Tutorials

How to Prevent Root Login Without a Password in MacOS High Sierra

2017-11-29 682 Posted by 3uTools

A significant security vulnerability has been discovered with macOS High Sierra, potentially allowing any person to log into a Mac with full root administrative capabilities without a password.


How to Prevent Root Login Without a Password in MacOS High Sierra

There are two approaches to preventing root login without a password on a MacOS High Sierra machine, you can use Directory Utility or the command line. 


Using Directory Utility to Lock Down Root


1. Open Spotlight on the Mac by hitting Command+Spacebar (or clicking the Spotlight icon in the upper right corner of the menubar) and type in “Directory Utility” and hit return to launch the app


How to Prevent Root Login Without a Password in MacOS High Sierra


2. Click the little lock icon in the corner and authenticate with an admin account login


How to Prevent Root Login Without a Password in MacOS High Sierra


3. Now pull down the “Edit” menu and choose “Change Root Password…” 


How to Prevent Root Login Without a Password in MacOS High Sierra


4. Enter a password for the root user account and confirm, then click “OK


How to Prevent Root Login Without a Password in MacOS High Sierra


5. Close out of Directory Utility



If the root user account is not yet enabled, choose “Enable Root User” and then set a password instead.


Essentially all you are doing is assigning a password to the root account, meaning that logging in with root will then require a password as it should. If you do not assign a password to root this way, amazingly, a macOS High Sierra machine accepts a root login without a password at all.


Using the Command Line to Assign a Root Password


Users who would prefer to use the command line in macOS can also set or assign a root password with sudo and the regular old passwd command.


1. Open the Terminal application, found in /Applications/Utilities/


2. Type the following syntax exactly into the terminal, then hit the return key: sudo passwd root



3. Enter your admin password to authenticate and hit return


4. At “New password”, enter a password you won’t forget, hit return, and confirm it


How to Prevent Root Login Without a Password in MacOS High Sierra


Be sure to set the root password to something you will remember, or perhaps even matching your admin password.

Thanks for visiting. For more latest updates or supports, follow us on Facebook or Twitter.

Related Articles

How to Check iCloud Activation Lock Status? How to Download Apps Using 3uTools? How to Unlock iPhone? How to Downgrade iOS 11.1.2 to 10.3.3 for A7 Devices With SHSH? iOS 11 Release Time in Your Time Zone Downgrade 32-bit Devices to Any iOS Version With SHSH v0rtexNonce - Downgrade from iOS 10.3.x to iOS 10.2/ 10.2.1 Without Jailbreaking Downgrade iPhone 5 / iPad 4 From iOS 10 -10.3.3 to iOS 8.4.1