This if for 10.6 and older.
Hold apple + s down after you hear the chime.
When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):
- mount -uw /
- rm /var/db/.AppleSetupDone
- shutdown -h now
After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and you’re good to go again!
For 10.7 or newer
You have to boot from a Lion Recovery drive, this can either be a recovery disk made with theLion Disk Maker tool, or just by booting from the built-in Lion Recovery HD partition.
- Hold “Option” at boot and select the “Recovery” disk at the boot menu
- Wait for “Mac OS X Utilities” menu to appear, indicating that you are booted into recovery mode
- Click on the “Utilities” menu and select “Terminal”
- Type the following: