Cure a funky keychain

Christopher Breen
26 June, 2011
View more articles fromthe author
AAA
Help

Something about Keychain Access on my Mac is messed up. I’d like to delete Keychain Access and reinstall a fresh copy. How do I do this?

Anon, via the internet

You’re putting the cart before the horse. Before throwing out the Keychain Access application I’d run through the steps necessary to cure whatever ails your keychain.

The first step is to launch Keychain Access and, from the Keychain Access menu, choose Keychain First Aid.

In the window that appears, make sure the Verify option is enabled, enter your administrator username and password, and click Start. If any entries appear in red, click the Repair button and click Start again.

With a measure of luck, the red entries disappear and you’re left with nothing but black entries and keychains that perform as they should.

If this doesn’t happen and you continue to have keychain problems, quit Keychain Access, go to youruserfolder/Library /Preferences, and move the com.apple.keychainaccess.plist file to the desktop. This is Keychain Access’s preference file. If it’s corrupt, it could be causing the problems you experience. You needn’t fear losing the data stored in your keychain.

Still having problems? If it’s only specific items that are causing you grief, open Keychain Access and use Search to locate related items. For example, if you’re having MobileMe login problems, search for .mac and delete those entries.

No luck? If you have a backup of your keychains (as you would if you’ve run Time Machine), quit Keychain Access and locate those backed-up keychains (found in youruserfolder /Library/Keychains). Try substituting them for your current keychain files (move the current ones to the desktop in case you need them later).

If that does no good (though it should), launch Keychain Access, choose Preferences from the Keychain Access menu, and, in the General tab, click the Reset My Default Keychain button. You’ll be prompted for your administrator password.

When you choose this, your old default keychain (probably the ‘login’ keychain) is renamed and a new, empty login keychain is created. You do this simply to get a fresh start. All your old keychain entries will be gone, so we’ll hope you’ve written down your passwords and login information.

If you’ve failed to write them down and you’re adventurous, you could try copying keychain entries from your old keychain to the new one. To do this, go to youruserfolder/Library/Keychains, locate the login_renamed_1.keychain file, and double-click on it. This will launch Keychain Access and cause the login_renamed_1.keychain item to appear in the Keychains list.

You can now select items in the old keychain and copy them to the new login keychain. This could be helpful if the old keychain itself was the problem rather than the entries in it.

Leave a Comment

Please keep your comments friendly on the topic.

Contact us
x
Sign up to the Macworld Australia newsletter

Receive the latest:

  • Apple news directly to your inbox
  • Features, opinion, tips and tricks
  • Information on the tools that will run your business more efficiently

Sign up now!
X


Sign up to the newsletter