If you have any questions or comments, please feel free to post down below. I tested on macOS 10.14 Mojave and it worked: This will force macOS to redo the initial first account creation, and doing so will not affect the current user profiles (they will remain intact) – so, if you prefer to make them as admin later, you can do that as well by logging in using the newly created admin account, then go to System Preferences, then Users & Groups, select the existing user, and tick “ Allow user to administer this computer.”
Complete the setup process, creating a new admin account.Remove the Apple Setup Done file by typing rm -v /var/db/.AppleSetupDone then enter. Here are the rules appearing on the net logon account: NethAuthSysAgent allow outgoing connection to domain domainname (where the domain name is the domain you are logging into) NethAuthSysAgent allow outgoing connection to ipaddress (where the ipaddress is the address of your OS X server, hosting the OD I guess) opendirectoryd allow outgoing.Mount the drive by typing /sbin /mount –uw / then enter.Boot into Single User Mode by pressing ⌘ + S before you hear the Apple chime.
If you ever need to recreate admin account on your Mac, this is the quickest and safest way to do it without breaking your Mac: