User account no longer in ‘admin’, how to recover? After a recent OS X update (currently Sierra, 10.12.3) the normal user on this machine is no longer in the admin group.

I don't know what caused the account to be removed from that group; how can I get it back?



Advice found via I don&#39;t have administrator account on my mac suggests booting to Single-User mode, and using the dscl command:

dscl . -append /Groups/admin GroupMembership username


This fails immediately:

Could not read path: path = /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist, error = 2: No such file or directory


and no change in groups occurs. Apparently I can't expect dscl to work in Single-User mode.

So what should I do, to re-add the username to the admin group?
After starting to Single User Mode enter:

/sbin/fsck -fy
/sbin/mount -uw /


Launch opendirectoryd:

launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist


Then enter (replacing username with the real user name):

dscl . -append /Groups/admin GroupMembership username


You will get an error "...com.apple.DirectoryServicesLocal.plist doesn't exit anymore ..." - ignore it! Your user should still get promoted to an admin user.

Enter exit to boot to the GUI.