Here's a way to restore passwords lost back into the Keychain content.
Keychain Access will lose saved passwords often when there's a stored password in Keychain desired to be deleted; and once the item is highlighted and Edit > Delete is clicked,
and, instead of just clicking the 'delete file' button, the 'delete file and all references' button gets clicked.
- Open Keychain Access (located in the 'Utilities' folder)
- Go to the "Keychain Access" menu > select "Preferences"
- Click the "First Aid" tab
- Make sure the "Synchronize login keychain password" box is checked.
- Close the Preferences window.
- Go to the "Keychain Access" menu and select "Keychain First Aid"
- Enter the administrator's username & password
- Click the "Repair" button.
- Click the 'Verify' button.
Now go ahead and restore all the missing, previously saved passwords back into Keychain Access:
1.) Quit the Keychain Access app.
2.) Goto ~/Library/Keychain/login.keychain file, then highlight it
3.) Enter Time Machine
4.) Goto a previous date's restore-point wherein Keychain Access held all your passwords correctly
5.) Click on 'Restore this file' —> replace the unwanted current version of this file;
6.) Goto ~/Library/Preferences/com.apple.keychainaccess.plist file, then highlight it
7.) Once again, enter Time Machine
8.) Select that very same previous restore-point-date that was used to restore the login.keychain file
9.) Click on 'Restore this file' —> replace the unwanted current version of this file.
Reopen the Keychain Access app and assure that all inadvertently deleted passwords were indeed restored,
and then
Go to the "Keychain Access" menu and select "Keychain First Aid"
Enter the account's username & password
Click the "Repair" button.
Close the Keychain Access app.
1Well, if you have a keychain in your Trash, just right-click it and put it back. Or move it to
~/Library/Keychains
. – slhck – 2012-10-15T11:51:14.803I did a search with Finder. There doesn't seem to have any directory named Library in my OSX 10.7.5.. – Stanley – 2012-10-16T03:15:06.980