You can create a new administrator account by restarting the Apple Setup.
Even though this Setup Assistant only runs once when you first install Mac OS X / macOS, it remains on your computer and is prevented from running by the presences of a hidden file called <.AppleSetupDone> in a system folder on your Mac.
Therefore, to have the Setup Assistant run again so you can create a fresh admin account, you simply need to remove this file
- Boot into Single User Mode: Start/restart your Mac. As soon as you hear the startup tone, press and hold ⌘ + S
- until you see a black screen with white lettering. (If you end up back
- on the login screen after a flash of the black screen with white
- lettering, enter your password and it will return to the black screen.)
- Check and repair the drive by typing /sbin/fsck -fy then ↩ enter - as directed by the on-screen text.
- Mount the drive as read-write by typing /sbin/mount -uw / then ↩ enter.
- Remove the Apple Setup Done file by typing
- rm /var/db/.AppleSetupDone then ↩ enter.
- Reboot by typing reboot then ↩ enter.
- Complete the setup process, creating a new admin account.
ref: https://apple.stackexchange.com/questions/164331/i-dont-have-administrator-account-on-my-mac
ref: How To Recover Lost Admin Rights On macOS High Sierra and Sierra, Mac OS X El Capitan And Yosemite - miapple.me