Macos – Keychain First Aid locks the keychain and can’t unlock it to perform first aid

keychainkeychain-accessmacos

After upgrade to OS X El Capitan I keep having problems with the keychain (such as needing to enter the keychain password every time an app wants to access the keychain, even though auto lock settings are off, and Keychain Access app shows it's unlocked already).

In Keychain Access app whenever I try to run Keychain First Aid on my login keychain I get this:

Verification started
Checking keychain configuration for kornel (user ID=501)
Home directory is /Users/kornel
Checked login keychain
Checked settings for ~/Library/Keychains/login.keychain
Keychain can't be unlocked automatically. Please attempt to unlock ~/Library/Keychains/login.keychain from Keychain Access.
Checked default keychain
Checked contents of ~/Library/Keychains/login.keychain
No problems found
Verification completed

The problem is that my keychain appears to be unlocked already, and starting the First Aid locks it.

How can I stop the keychain from locking itself? Or rebuild it without losing saved passwords?

Best Answer

I've found the culprit: Junos Pulse VPN software (5.1) breaks the keychain and system CA certificates in OS X 10.11.

I've deleted Junos Pulse completely, and the system is happy now.