Managing Mail’s Auto-completing Addresses Find Information about Any Mac
Sep 24

The Mac OS X Keychain is a pretty cool thing. (No really! It is! Honest!) We talked a little about what does and what it can do in a previous article. But what do you do when things go wrong? Every once in a while, a person will end up with a repeating prompt, “Please enter your keychain password…” when you open your web browser. In this article, we’ll go through how you can take care of this and other maladies revolving the keychain.

Perhaps you’ve run into this window every time you fire up your browser:

Safari asking to unlock the keychain

And if you hit “Cancel”, the window tends to pop up repeatedly. So what is this about and how do you get it to stop?

Why Is This Happening?

As we discussed before, the keychain is a place for any application that needs to store sensitive stuff, rather than have those applications handle this function on their own. And the keychain protects this information with, ironically enough, a password.

When you log in to Mac OS X (either deliberately or by setting up automatic login), the system tries to unlock your default keychain (called “login” in Mac OS X 10.3 and later). It uses the same password that you used to log into your machine. Normally, that works just fine. When you pop open your web browser, the keychain is all ready unlocked, and it helpfully gives back all the secrets that the browser stashed there.

But sometimes things can go “wonky”.   At times, the password for your account and the password for your keychain can get out of sync. For example, let’s say you forget your password and you use one of the emergency techniques for resetting it. You breath a sigh of relief, because you can now get back into your Mac, but now you have that annoying “Please enter your keychain password…” box. This can happen quite regularly to Macs that are managed as part of a larger network, or sometimes when you transfer an account from one Mac to another.

Regardless of how it happened, you have a couple of options. You can either reset the keychain password to match your user account password or delete the keychain and start over.

I Know My Old Password

If you know the old password for the keychain, resetting it is probably your best bet. You get to keep all the stuff that was saved on it.

Open up “Keychain Access” in your “Applications”–>”Utilities” folder. Make sure you’re clicked on the “login” keychain. (You might need to click the button “Show Keychains” at the bottom of the window.)

Keychain Access

When you’ve selected the “login” keychain, you can go under the “Edit” menu and choose “Change keychain password”. Change it to one that matches what you use to log in and you’re good to go.

I Forgot My Old Password

You don’t know your old password? Well, as we talked about last time, the keychain is pretty heavily encrypted so that someone that doesn’t have the password won’t be able to get your secrets. And if you forgot your password, that means you don’t get your secrets either. The best thing you can do at this point it delete the keychain and start over.

Go to your “File” menu in Keychain Access” and pull down “Delete keychain ‘login’”. It will ask you if you want to just delete the reference to it (meaning the system stops looking at it), or the actual file itself (the part on the hard drive with the 1’s and 0’s.) Unless you feel you might some day find that password, you might as well “Delete References and Files”.

Delete Keychain

So now you have deleted your keychain. Where will applications save your passwords from now on?

If you click the “Remember Password” checkbox when it shows up (almost anywhere) and there is no keychain, you will be prompted to create a new one. If you’d rather do that right now, while Keychain Access is open, it’s simple enough.

Go under the “File” menu and choose “New Keychain”.  Call it “login” and give it the same password as your OS X account. You’ll start off with a new, empty keychain that will automatically unlock when you log in next time.

Other Keychain Tips

Under the “Keychain Acess” menu, there’s an option for “Keychain First Aid.” Just what does this do? I really don’t know. I’ve never had a keychain go bad on me, but I can’t imagine that it’s a bad idea to try it out if you’re having problems.

Leave a Reply