Macos – How to become root in Yosemite?


I have a late 2013 Mac Pro running Yosemite.

How can I become root in Yosemite? There is no root user listed in Users & Groups under System Preferences… I need help to be able to be root so I can administer my system in a professional way.

Best Answer

Exactly the same way as for all Mac OSes since Lion...

From the Apple menu choose System Preferences....
From the View menu choose Users & Groups.
Click the lock and authenticate as an administrator account.
Click Login Options....
Click the "Edit..." or "Join..." button at the bottom right.
Click the "Open Directory Utility..." button.
Click the lock in the Directory Utility window.
Enter an administrator account name and password, then click OK.
Choose Enable Root User from the Edit menu.
Enter the root password you wish to use in both the Password and Verify fields, then click OK.

Or from Terminal when logged in as an admin user -
dsenableroot to enable,
dsenableroot -d to disable