(sorry, you need Javascript to see this e-mail address)

Top stories

Filter posts by: Mac iOS Hardware Software

How To Reset Your Mac Password [MacRx]

How To Reset Your Mac Password [MacRx]

Not knowing your Mac’s password is like locking yourself out of the house; it’s inconvenient (at best) and always happens at the worst possible time.  In our efforts to shield information from others we often wind up just blocking access for ourselves.  Fortunately there are several ways to reset your Mac password when amnesia strikes or relevant information isn’t available.

Some methods of resetting your password can affect access to the keychain, however, where many of your other passwords are stored.  Nothing in life is free…

Changing a Known Password

The easiest form of password reset is to change your password when you already know the existing one.  This is handled in System Preferences.  Login to your account (or the account to be changed), and go to System Preferences –> Accounts.  Select your account and click Reset Password… The Mac will ask for your existing password and the new one, entered twice for verification.

How To Reset Your Mac Password [MacRx]

If your user account does not have permission to administer the computer, you will need to enter an admin account name and password to complete the change. The system will then confirm with the following dialog (or something similar):

How To Reset Your Mac Password [MacRx]

When you don’t know your existing password, things get more interesting.

Resetting a Password from another Admin Account

If your Mac has multiple user accounts defined and you know the password for another admin account, you can use the second account to reset the first.  Logout of the affected account (if necessary) under the Apple Menu, then login to the accessible admin account.

Go to System Preferences –> Accounts and click the lock at the bottom left of the window to authenticate as an administrator, then select the account needing the change.  Click Reset Password… and enter the desired new password.  The account has been reset again, except for one important difference.

When you reset a password from outside a user account, that user’s Keychain password does not get reset.  The keychain is an encrypted file on your Mac which stores many of your other passwords (web sites, WiFi networks, etc.).  By default the keychain password matches the account password.  However when you force-reset an account password the Mac can’t access the keychain, since it doesn’t know the existing password to use for decryption.

How To Reset Your Mac Password [MacRx]

In this situation you can login to the account but now each time you try to retrieve or save a password you will be asked to reenter the old keychain password.  Which you likely don’t know, otherwise you wouldn’t have had to reset this in the first place!

The usual workaround is to delete the old keychain file (named login.keychain) located in your Home folder –> Library –> Keychains (or in UNIX speak  ~/Library/Keychain/login.keychain).

Once deleted the system will create a new keychain file using your new account password and the error messages will stop.  However, it also means you will no longer have access to all the passwords previously saved in the keychain and will need to enter these items again.

As noted, there’s no such thing as a free lunch.

Resetting via Password Utility on a Mac OS X Install DVD

If you don’t have an accessible admin account on your Mac, you can always use a Mac OS X Install DVD to accomplish the task.  The grey Software Install disc that came with your Mac will work, or any retail (black) Mac OS X installer which supports that model.  You will need physical access to your Mac to perform this kind of reset.

Insert the DVD, reboot and hold down the C key.  Let the installer start and run normally until you get access to the menu bar, then choose Utilities –> Reset Password. The Mac will scan for all available accounts and allow you to change passwords as desired.  When complete, quit the Reset Utility and the Installer, then reboot normally.

The Mac will boot to the login screen when reset in this fashion, disabling any previously setup auto-login.  As above the keychain password does not get reset when using this method; expect to delete the old keychain and start fresh once you’re back into the affected account.

About the author

oakbog Adam Rosen is an IT consultant specializing in Apple Macintosh systems new and old. He lives in Boston with two cats and too many possessions. In addition to membership in the Cult of Mac, Adam has written for Low End Mac and is curator of the Vintage Mac Museum. He also enjoys a good glass of Pinot Noir.

(sorry, you need Javascript to see this e-mail address)| Read more posts by .

Posted in How-To, Mac, MacRx | Tagged: , , , , |

  • http://www.celsodantas.com Celso Dantas

    nice

  • The Frenchie in the Netherlands

    The Mac OS X Install DVD method will work provided that the boot device has not been previously locked to internal hard drive of course by yourself or your system administrator.

    As a matter of fact, this option is a well known security breach you have to take in consideration if you want to prevent any bad intentioned person to be able to reset your password and then gain access your data and truly lock yourself out of your own “house”.

    No perfect solution, nice clarification post though.

  • Helma

    You don’t need the install dvd if you have mislaid the password on the primary user account; simply start up in single user mode and change the password in the terminal.

  • Jough

    The Keychain will sync up again once the user changes the password in System Preferences. Even if it’s changed to the same password.

  • http://www.oakbog.com Adam Rosen

    Helma – making changes via the Terminal is indeed powerful, but is not something I recommend undertaking unless you are comfortable with this tool and command line input. Can you post the commands needed to do this via single user mode?

  • Alknight

    1) mount -uw /
    2) rm /var/db/.AppleSetupDone
    3) shutdown -h now

    After rebooting you have a new admin acount and can delete the other account or password.

    **a few times I had to put fbin or something before each command but when I put the first command it will tell you in the error msg(like 5 lines up)

    Just a reminder…use only in your own environment or an approved environment

  • firesign3000

    The ability to change passwords via the install DVD is a huge security hole, in my opinion. It means that anyone with an install disc can change any password, not just yours, and can also set the password for root which would give them access to look at/change/delete anything on any Mac that’s set to allow booting from DVD or external devices. This may not be that big a deal on home computers, but it matters for Macs in the corporate/edu/government environment.

  • http://www.oakbog.com Adam Rosen

    Firesign – you’re correct, the ability to reset a password via the install disk is simultaneously a security risk and a potential lifesaver. However you can generally access the files on a Mac’s hard drive using any other boot disk and a bit of UNIX knowledge. For the best protection of data use password protected files and full or partial disk encryption.

  • rich

    thanks for the tips, much appreciated!!!