Reset a Lost Mac OS X Password

First Solution :

  • 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:




  • Confirm the user account and then the password change and reboot Mac OS X 10.7 as usual with your new password


Second Solution :


Delete AppleSetupDone and Create a New Administrative Account


             Mac OS X 10.7 does share a more untraditional approach to resetting a password as past versions of OS X. In this case, you can still delete the AppleSetup file which                 forces the “Welcome to Mac OS X” setup assistant to run again, which allows you to create an administrative account. You can then login to that new administrative account and reset your original account password.

            From the Recovery Drive’s Terminal, type:

        rm /var/db/.AppleSetupDone

           Then reboot either through the menu item or by typing ‘reboot’ into the command line.

           Follow the setup procedure as usual, create the new administrative account, and wait for Mac OS X to boot as usual into the new user account. You won’t see any of your familiar files or settings yet, and this is normal, because you have to reset the original password. Here’s how:

  • Open “System Preferences” and click on “Users & Groups”
  • Click on the lock icon in the lower left corner and authenticate, allowing you to make changes to user accounts
  • Select your original user account from the left side Users list, and then click on the “Reset Password” button on the right.


Third Solution :

  •  Launch the Terminal, located in /Applications/Utilities/
  • Type ‘whoami’ at the command line to get the current users precise login name, which will look something like this:

            $ whoami

then type:


    dscl localhost -passwd /Search/Users/username

  • Type the following command, replacing ‘username’ at the end with the exact current users login name that you retrieved from whoami:
  • Enter the new password once, hit return, and confirm the new password again hitting return

The password is now changed.