Safari keeps asking permission to access the keychain

10,767

Solution 1

Yes, if you press Always Allow would put it back to it's default behaviour otherwise it will ask you to access the Keychain each time. By pressing Allow you tell the security system to allow Safari to access it once and only once, if you say Always Allow you say it can access it from now on until it is updated again. (Developers have an option to avoid this issue by signing their applications)

Solution 2

You have two potential problems. The first is that your default keychain is no longer set to "login". Open up Keychain Access (/Applications/Utilities/Keychain Access.app), select the login keychain, and choose File » Make Keychain "login" Default.

The second potential problem is a damaged keychain. In Keychain Access, still with the login keychain selected, choose Keychain Access » Keychain First Aid. Enter your password and hit repair.

Solution 3

I've had about the same problem and it has everything to do with Code Signing. There are complex ways to change the Safari code signing, so take the easy way: just put you Safari application in the trash can and copy the complete (working) Safari application from another Mac (with the same version number) to yours.

Keychain Access will ask you for permission. Choose "always" and you're problem is fixed!

It did the trick for me after Googling and troubleshooting for hours...

Solution 4

Though given your description I doubt it's the case, but maybe the digital signature of Safari itself is broken? You can test it using:

codesign --verify --verbose /Applications/Safari.app

...which should give you:

/Applications/Safari.app: valid on disk
/Applications/Safari.app: satisfies its Designated Requirement

(And if indeed it's broken, then see If Mac code signing is tampered with, what might fail?)

Solution 5

I've had this problem with my Aunt's 2010 iMac; she forgot the master password and I performed a reset using the install disk. However, since then she has been plagued by the same issue detailed above, repeated requests for password. I finally had a chance to go to the Apple Genius bar having exhausted all discussion forums to no avail and was given an as yet unproven solution. The guy says he gets this problem all the time and he was pretty confident it would work.

As follows:

  1. Close all programs except the Finder and go to Home/Library (may also be Username/Library)
  2. Find the Keychains folder in here; delete it
  3. Log out / Restart immediately
  4. Keychain will recreate the folder and you should be good to go

I will update this post on attempting this fix; it sounds logical though. Anyone who has success, feel free to chime in. I should also point out that this will obviously wipe any application/web passwords you already have saved but I don't think that should be an issue for most people.

Update: It worked, so far so good! Can't believe the solution was so simple!

Share:
10,767

Related videos on Youtube

GameFreak
Author by

GameFreak

Updated on September 17, 2022

Comments

  • GameFreak
    GameFreak over 1 year

    Normally when I save a password in Safari it will get added to my login keychain without fuss (assuming that it is already unlocked). But after I set a a master password the default keychain was changed to FileVaultMaster. When I set it back to login Safari then started to always ask for permission to access the keychain.

    To get it back to the default behavior should I chose always allow or is there something else I should do?

    • alex
      alex over 14 years
      Same thing happened to me for Mail.app. The only way I got it to remember my passwords was to reinstall Mac OS (I reinstalled for different reasons, but it also solved the problem).
  • GameFreak
    GameFreak over 14 years
    I had already done both of those before I posted the question. In fact I mentioned doing the fist part in the question.
  • GameFreak
    GameFreak over 14 years
    The signature is valid.
  • Arjan
    Arjan over 14 years
    Though for some reason (that I don't understand) signed applications are by default allowed incoming connections by the application firewall, I don't think they are by default granted access to the keychain as well?
  • Chealion
    Chealion over 14 years
    @Arjan: One of the main advantages for developers to sign their applications is that when a new version is released it won't ask for permission to access the keychain again as it still is "signed" and trusted as that application.
  • Arjan
    Arjan over 14 years
    Ah, I missed that part about "until it is updated again". That's true, though all Apple applications are signed, so one should indeed not get such prompt, not even if Safari is updated. But I guess you know that too. :-) (By the way, if you happen to know what might fail if the signature is messed up, then please read my superuser.com/questions/47504/…)
  • Chris R
    Chris R over 13 years
    I, however, was really helped by the second suggestion. Thanks!