Lost access to admin user account in my mac book pro
You can recover the admin privileges easily by rebooting into Apple’s Setup Assistant tool. This will run before any accounts have been loaded, and will run in “root” mode, allowing you to create accounts on your Mac. Then, you can recover your admin rights via the new administrator account. After that, you can reboot into your recovered admin account and delete the interim administrator account.

Start up the Mac whilst holding down ⌘-S. After a few moments, you'll see the Mac boot to the command line.

/sbin/fsck -fy

/sbin/mount -uw /

rm /var/db/.AppleSetupDone


After that, simply enter reboot and your Mac will restart and boot normally. Only this time, Setup Assistant will launch. This will run before any accounts have been loaded, and will run in “root” mode, allowing you to create accounts on your Mac.