Root user no longer exists

0

1

I'm running macOS Server 5.6.1 on High Sierra (10.13.4) and I was trying to modify a system launch daemon plist file the other day as my apache installation wasn't working after migration. sudo wouldn't allow me to change anything due to SIP restrictions, so I decided that I'd try to get a root login shell and try to modify the plist file that way. I'd previously enabled the root user years ago when I first got the computer. I opened a Terminal window and tried login root and entering the password. Nothing. I tried a few different possible passwords but none of them worked.

At this point, I figure that I must have forgotten which of the dozens of passwords I used for the root account. No problem, though, because I can reset the root password, right? So I open Directory Utility, authenticate, and click "Change Root Password..." in the menu. I try logging in again—to no avail.

I'm a little confused now, but I decide to try disabling the root user in the menu and then re-enable it. However, clicking on "Disable root user" does nothing, and it never changes back to "Enable root user". Trying dsenableroot -d returns dsenableroot:: ***Failed to disable root user. Slightly concerned now, I try sudo dscl . -passwd /Users/root, but that fails with the message <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName). I also try sudo passwd root, which gives me passwd: Unknown user name 'root'.

Now I'm very worried. How on earth could the root user just disappear?? top and the Activity Monitor show plenty of processes owned by root, but dscl . -list /Users UniqueID doesn't have an entry for root, or a UID of 0. In fact, as far as I can tell, the root user simply does not exist. Even in the File Info dialogs in Finder, files and folders owned by root show "Fetching..." in the area where the owner name should be (see image).

Finder file info dialog

As I don't use this computer on a daily basis, and certainly don't log on as root often, I have no idea when this started or for how long I've not had a root user. I'm pretty sure it's been at least a month or two, but other than that I don't know.

Can someone please help me figure out what the heck is going on here and how to fix it?

Matt

Posted 2018-05-14T06:32:02.637

Reputation: 437

Is SIP enabled? – Tetsujin – 2018-05-14T06:48:18.590

@Tetsujin yeah. – Matt – 2018-05-14T06:48:55.720

Disable & try again, root & SIP don't mix. csrutil disable from Terminal in Recovery. – Tetsujin – 2018-05-14T06:54:37.673

@Tetsujin Tried it, but none of the above worked :/ – Matt – 2018-05-17T18:00:05.550

1

Sorry, then I'm out of ideas. I haven't used root itself in 10 years or more. I tend to just use sudo. Maybe run Onyx over the disk perms?

– Tetsujin – 2018-05-17T18:07:01.650

No answers