Keychain says "Access to this item is restricted" after upgrading to Lion

Solution 1:

There are several reasons Keychain does this. Often it's because a new account that you might have switched to does not have the same/correct paths to Keychain that it used to. For starters try changing the main login password of your account; if that doesn't do anything try this in terminal:

$ sudo touch login.keychain
$ codesign -vvv /Applications/Utilities/Keychain\ Access.app

If you get an error such as:

/Applications/Utilities/Keychain Access.app: code or signature modified

then:

$ codesign -vvv /Applications/Utilities/Keychain\ Access.app

which should give you the response:

/Applications/Utilities/Keychain Access.app: valid on disk
/Applications/Utilities/Keychain Access.app: satisfies its Designated Requirement

Reboot.

Solution 2:

Does running the command-line version of Keychain:

security dump-keychain -d login.keychain

also fail, but with the weird message In dark wake, no UI possible?

Then part of Mac OS is confused about whether it is asleep or not. There’s no need to reboot. Put it to sleep, wake it up, and Keychain should be fine again. This happens on my MacBook Pro sometimes: I open it to wake it, press the power button out of habit, only to turn it off as it is trying to start up, resulting in weird Keychain behaviour.

Solution 3:

this worked for me - open Keychain access, click the lock to lock the keychains, then unlock again!