This step-by-step tutorial will teach you how to reset a lost or forgotten user account password in Mac OS X without the use of installation discs.
Note that this procedure should only be used as a last resort. Prior to this operation, it is recommended that users be familiar with the password and security documentation provided by Apple.
How To Reset OSX Password with the Rescue Partition
Recent Mac models are shipped without installation discs (which usually contain the password reset utility). Instead, all the installation data and utility tools are stored on a hidden partition, commonly referred to as Rescue Partition.
Step 1. Reboot your Mac while holding the [CMD] + [R] keys down. A window titled, “OS X Repair Utilities” will be displayed.
Step 2. Click on the Utilities > Terminal and run the “resetpassword” command to open the password reset utility.
Step 3. Select the system drive and then choose the desired user account.
Step 4. Enter the new password and confirm.
Step 5. Click the Save button to apply your new settings.
Step 6. Before exiting the password reset utility, move to Reset Home Directory Permissions and ACLs section and click on the Reset button.
Step 7. Close the Terminal and exit the Repair Utilities screen. Restart your Mac and sign in with your new password.
Apple provides a variety of resources that can help you recover your system passwords. More information can be found in the links below.