How to recover Mac OS X Password
If you have ever lost a password to an account on your Mac and cannot install anything or possibly even log in because you forget your password, I explain here how to recover it.
Important: If you have a newer Mac then you should skip to the bottom in which I explain on, obviously, newer Macs.
1. Go to the Login screen and click "Reboot"
2. While the computer is rebooting hold down "Command - S"
3. At the prompt type the following:
/sbin/mount -uw /
4. When the prompt starts again type but replace the brackets and "username" with the username of the account you would like to change the password to:
5. After type the following:
More information and/or comments can be found here.
Mac OS X Password Recovery 2
There are obviously numerous other ways of recovering a password in Mac when not currently "available."
Another way of doing so I explain below (Warning it is deleting a login item allowing for the computer to somewhat "reset" but still have your data):
1. Restart the computer and hold down Apple-S, which is the same we did previously. When the prompt loads do the following:
2. Type: /sbin/mount -uw /
3. Type: rm /var/db/.applesetupdone
4. Type: reboot
5. When the computer has restart it will allow you to virtually recreate the entire computer again, yet you will still have your previous data.
6. Make sure you do not rename anything the same as to not overwrite. Also select "Do Not Transfer My Data."
The "Definently Works Correctly" Way.
Some of the previous ways may not have possibly worked, which is common for "recovering." The following is the way I did it (Note: We are not responsible for any problems.):
1. Load the computer in Single User Mode (as explain previously.)
2. Type: rm -f
3. Type: rm -i
4. (Have not tried this, yet may be a completely bad idea.) /sbin -f or /bin -f or /sbin -i or /bin -i
5. Continue to try out different functions dealing with rm and attempt to delete it. After approximately two tries with "rm -f" type: reboot.
6. The computer should take a long time to load. Then if it loads it should simply display just a blue background.
7. Turn the computer off and load it in single user mode. Type: reboot
8. It should take a long time to load again this time and you will be able to reconfigure the computer, yet you will likely need a .Mac account which can be received as a 60 day free trial on apple.com.
More information here (Note: This is not included in the article):
Mac 101: Reset your Mac OS X Password