So i want to enable root... I've tried under /System/Library/Core Services/Directory Utility (ie., "enable root)....

The problem is that root (or "other") never becomes a login option.. nor does it allow me to ssh into the box as root...

In Terminal, when I try dsenableroot, I get:

'dsenableroot:: ***Failed to enable root user.'

If I try to DISABLE (dseneable -d).. I get:

'dsenableroot:: ***Failed to disable root user.'

Any thoughts?

I should mention that this server HAS been used with ssh "as root" previously - it seems to have mysteriously lost the ability for other systems on the network to see it or ssh in as root.

Edit: Please don't waste bandwidth trying to convince me of a client/user level work-around. I'm a senior netadmin, and am able to wear my big-boy pants. I've successfully NOT f'd up my dozen-ish servers over the past 2 decades operating as root.

This is a back-end support server sitting inside a DMZ, running a specific appliance package - it will not be upgraded, will not be exposed, and no, i have no intention of upgrading to a newer OS in the next decade. in fact I've got 2 spare servers sitting beside it if/when this server dies, to replace it immediately..

I'd prefer to just know how to fix the issue at hand, which is that this 10.7.5 server is failing to enable root...

  • Why not ssh in as a normal user then sudo or manage the sudoers file to allow your chosen user root permissions on select scripts and tools?
    – bmike
    Oct 17, 2016 at 23:33
  • 1
    Thanks for the note. Perhaps I should have pre-answered this question. The short answer is: NO, I do not give a rat's pink posterior about anything other than than enabling root. I have some 12 or 13 servers, and one of them is failing to enable root. And I'd prefer to have the actual root access, which is pretty common for server admins to be able to do. I'm not interested in duct-tape. I'm not interested in client - level useage. I need to operate root, and need to enable root as intended. Oct 18, 2016 at 0:03
  • Are the other servers 10.7.5, too, or just this particular box?
    – IconDaemon
    Oct 18, 2016 at 0:14
  • Don't call me nazi - I'm already german...
    – klanomath
    Oct 18, 2016 at 0:14
  • I've got some 10.6, others 10.7, others 10.8, 10.9, etc... it varies... Some 12-15 weeks ago, ssh login was working perfectly fine.. and I'venot done any updates or major changes.. it just quit becoming an option, and my ssh (as root) quit working... I can easily ssh as any admin user, can 'sudo', but CANNOT log in as root, nor can I successfully run desenable root.... Oct 18, 2016 at 0:16

3 Answers 3


Try: sudo dscl . -passwd /Users/root PASSWORD. Else: a bit-flip hit your disk and corrupted your Directory Services "database" exactly there where the root user's data usually resides. Check this with the usual tools like dscl or even copying the root.plist:

sudo cat /private/var/db/dslocal/nodes/Default/users/root.plist >  ~/Desktop/root.plist

The default root.plist with root disabled looks like this:

enter image description here

The root.plist with root enabled (redacted all hashes etc.):

enter image description here

  • May I ask how you were able to obtain a text based version of the .plist file? and what software you used? I am only asking, because I came across the same issues as the OP and I went through the steps you suggested and I obtained a different format...Not as clear as yours.
    – Xertiem
    Feb 10, 2018 at 8:02
  • @Xertiem The app is Xcode.
    – klanomath
    Feb 10, 2018 at 10:19

Well, it would appear that the server had deeper issues - the SSD drive was beginning early failure, and from what I can tell, corrupted Directory Services db... several hours into working on it, I lost ALL account access (all users would no longer log in), and eventually it crashed...

TimeMachine is a great thing.....


I've found the solution here: Enable the “root” user using Single User Mode in Mac OS X

  • Hold down ⌘-S whilst turning on the machine, the system will then boot into Single User Mode
  • Type

    /sbin/fsck -fy
    /sbin/mount -uw /
    launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
    passwd root

The Mac will now restart and take you to the logon screen, log into the Mac as the root user and use the password set in the step above.

An additional step you can take to confirm the root user has been logged in is checking the Users & Groups in Systems Preferences, the logged on user should state System Administrator

You must log in to answer this question.

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