Password Forgotton of MAC Admin Account 3 ways
https://letsknowaboutcomputer.blogspot.com/2012/12/password-forgotton-of-mac-admin-account.html
1) Put in an OS X install dvd (any version after 10.1 will do) and reboot holding C. Select 'reset password' from the menu bar. This should be relatively straightforward.
2) If you don't have install media on hand, instead reboot holding command-S. A terminal window should come up. When the text stops appearing, type:
"/sbin/mount -uw /" without the quotes and hit enter. Then type:
"sh /etc/rc" without the quotes and hit enter. Wait for the text to stop appearing.
What you're doing is booting into single-user mode, which gives you very limited shell access to the system, but as the root user. You then mounted the filesystem (so you can read/write to the password files), then started system services (so that you can use the netinfo database that handles passwords.
Anyways, then type "passwd someusername", where someusername is replaced by an administrator account on the computer, and hit enter. Then type your new passwords and hit enter, then type it again when prompted to do so and hit enter. If it says "sorry", then that was not a valid username - try again. Enter "reboot" to reboot, and the password should be reset.
3) If you don't know the admin account name, or if you don't want to mess with existing admin accounts, you can create a new admin account:
Reboot holding command-s
Type "/sbin/mount -uw /" without the quotes and hit enter.
Type "rm /var/db/.AppleSetupDone" without the quotes and hit enter.
Type "reboot" without the quotes and hit enter.
When the computer reboots, it should run the setup assistant. Run through it, and it'll create a new admin user account on the machine for you.
2) If you don't have install media on hand, instead reboot holding command-S. A terminal window should come up. When the text stops appearing, type:
"/sbin/mount -uw /" without the quotes and hit enter. Then type:
"sh /etc/rc" without the quotes and hit enter. Wait for the text to stop appearing.
What you're doing is booting into single-user mode, which gives you very limited shell access to the system, but as the root user. You then mounted the filesystem (so you can read/write to the password files), then started system services (so that you can use the netinfo database that handles passwords.
Anyways, then type "passwd someusername", where someusername is replaced by an administrator account on the computer, and hit enter. Then type your new passwords and hit enter, then type it again when prompted to do so and hit enter. If it says "sorry", then that was not a valid username - try again. Enter "reboot" to reboot, and the password should be reset.
3) If you don't know the admin account name, or if you don't want to mess with existing admin accounts, you can create a new admin account:
Reboot holding command-s
Type "/sbin/mount -uw /" without the quotes and hit enter.
Type "rm /var/db/.AppleSetupDone" without the quotes and hit enter.
Type "reboot" without the quotes and hit enter.
When the computer reboots, it should run the setup assistant. Run through it, and it'll create a new admin user account on the machine for you.