Just recently stumbled on this issue. Symptoms- despite having admin or root privileges, you can’t delete a user account in System Preferences/ Users & Groups.
According to this-
https://medium.com/@ambroselittle/cant-delete-original-admin-user-on-macos-high-sierra-1d79fb438246
and this
It’s a hangover from ‘ye olden days’ and requires quite a lot of complex manoeuvres to fix.
Well, I got lazy and did this bit-
- System Preferences > Login Options > Join… > Open Directory Utility…
- Click to unlock it
- Go to Directory Editor. Search to find the user you can’t delete
- Find the GeneratedUID field on the right and copy it somewhere safe.
- Change one digit in it and Save
At this point I diverged from the script and simply closed stuff and attempted to delete the recalcitrant user- and ye verily it was able to be deleted (took a while because it was a big account)
So I don’t claim to have done anything new, but simplified the instructions. This worked and the machine reboots fine, no issues detected…