Mac Book Pro 2012 Terminal Pass Recovery
This can be done by removing the .AppleSetupDone file, forcing the Mac to go back through the initial setup, part of which includes creating an admin account.  The following steps should walk you through that process:


Shutdown as normal
Power on your Mac while holding command+S to enter Single User mode
Type rm /var/db/.AppleSetupDone and press return
Type reboot and press return
The Mac should now reboot and go through the setup assistant, allowing you to create a new admin account.


Once you have an admin account you should be able to use sudo elevation in Terminal and remove any other user accounts on the system.