I wrote a few weeks ago about my fondness for Keychains in Mac OS X. While I remain fond of the system and still rely heavily on it, there have been times when the passwords it used were not correct, or my system would lock up when the keychain was accessed. In these cases there are two things to try—both are super easy but only one is nondestructive.
The first (nondestructive) method is Keychain First Aid. If you notice systemic weirdness when your computer is accessing a keychain, this is step one. From the Keychain Access menu on the top-left of your screen, select Keychain First Aid. Enter the account password, and then select Verify or Repair. Repair is what you want in most cases.
If that doesn’t find anything wrong, you’ll want to reset your Keychain entirely. Beware: this will wipe out all of your stored passwords, so proceed with caution. I’m not a magician and can’t recover them once they’re gone! From the File menu select Delete Keychain “login” and then click Delete References and Files. As you rebuild your keychain from that point on, you’ll undoubtedly notice that your original password-based problem has been resolved.