5

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.

5
  • 5
    I suggest you reconsider your “professional ways”. It’s never necessary to permanently log in as root. There’s always sudo.
    – Daniel B
    Oct 26, 2014 at 9:37
  • What makes you think running the GUI as root would enable you to administer the system more professionally? It's just a call for issues. Your standard admin user will suffice.
    – slhck
    Oct 26, 2014 at 9:38
  • 1
    With 30+ years of UNIX system admin, system programming and application programming under my belt, I know what I need to work professionally in a UNIX(-like) OS. Being able to write scripts and applications is best done in a terminal window, logged in as root.
    – Bo Thidé
    Oct 28, 2014 at 11:34
  • I Mavericks, I used to run as a normal user, then if I needed to install software via Terminal, I would sudo to my superuser, install, then logout of superuser. Now when I try to login to superuser on Yosemite, I keep getting the "Sorry, try again" message. When I try to use dsenableroot, I get "dsenableroot:: ***Failed to enable root user." May 1, 2015 at 17:31
  • I'm with Bo. I administered UNIX systems for Fortune 500 companies 30 years ago via a VT-101 80 column by 24 line terminal. Although I think it's a good idea for Mac OS to disable root "out of the box," some of us don't need training wheels. I actually find knowing I'm logged in as root to be more careful. Dec 8, 2015 at 18:14

1 Answer 1

15

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

4
  • Thanks for the info. I already found 'dsenableroot(8)' and now I can log in as root. I have more than 30 years of UNIX system admin, system programming and application programming under my belt so I am comfortable being logged in as root and need to use a shell.
    – Bo Thidé
    Oct 28, 2014 at 10:30
  • This does not apply to Yosemite. Just verified on 10.10.5. Once you've opened the Directory Utility you're not prompted for an admin account name nor password. There is a Lock button next to the text "Not authenticated" in about the middle of the dialog. Clicking that and logging in with an admin account will unlock it, however, the "Enable Root User" in the Edit menu remains greyed out. Ideas?
    – davemyron
    Sep 30, 2015 at 21:26
  • You weren't prompted for name/pass in User Accounts either. You must click the lock. Same in Directory Utility, bottom left of the window. Then 'enable root' will be ungreyed. [BTW, don't do it in the Directory Editor pane, that's something else entirely]
    – Tetsujin
    Oct 1, 2015 at 6:46
  • Thanks for your help! For me, I went to the top menu edit then chose enable root. @Tetsujin says it in his instructions but I overlooked it the first time I read through. Oct 22, 2015 at 15:17

Not the answer you're looking for? Browse other questions tagged .