If you have no Administrator accounts at all, follow this procedure to create a new, temporary Administrator account from which you can fix your normal one.
- Power on or restart your Mac.
- At the chime or grey screen, hold ⌘ and S on your keyboard to enter single-user mode.
- At the prompt, type
fsck -fy
and press Return.
This is a simple check for file system integrity and is optional. It will take a moment or two to complete. Wait for it to finish before proceeding.
Type the following exactly as written, one line at a time, each line followed by the return key. There is a single space preceding the first "slash" ( / ) character in each line:
mount -uw /
rm /var/db/.AppleSetupDone
shutdown -h now
When you restart the machine, it will take you through the entire setup and registration process all over again. When you do so, create a brand new account with Admin privileges. Give it a simple and disposable name since you will delete it later. Do not choose the option to transfer or migrate information to the Mac.
When it completes, log in under that new account, change your previous account back to Admin, and log out.
Log in using your old account, which will now have its Admin privileges restored. Delete the throwaway account you just created.