MacOS – Why would dsenableroot NOT work on a 10.7.5 OSX Server

macosserver.appsshterminal

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…

Best Answer

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