OS X keychain not visible to Keychain Access.app in Mavericks
Asked Answered
S

1

12

I've set up a keychain as follows:

sudo /usr/bin/security create-keychain -p 'temporaryPassword' MyKeychain.keychain

The keychain is present and working as shown by:

/usr/bin/security show-keychain-info MyKeychain.keychain
Keychain "MyKeychain.keychain" lock-on-sleep timeout=300s

The permissions in ~/Library/Keychains are all consistent.

Why does Keychain Access.app not show MyKeychain in its Keychains panel?

Singular answered 5/12, 2013 at 5:8 Comment(1)
See follow-up at discussions.apple.com/message/23571041#23571041Singular
I
34

Because MyKeychain is not in the keychain search list.

Even though the man page for security says that create-keychain adds the created keychain to the search list, it does not actually do that in 10.9.0. This seems like a bug to me, as it works as described in the man page in 10.8.5. Try this:

security create-keychain -p 'temporaryPassword' MyKeychain.keychain
security list-keychains

If you don't see MyKeychain.keychain in the resulting list, you need to add it. For example, let's say you got this list back from security list-keychains:

/Users/fred/Library/Keychains/login.keychain
/Library/Keychains/System.keychain

You can add MyKeychain to that list with this command:

security list-keychains -d user -s login.keychain MyKeychain.keychain

The instant you do that, you'll see MyKeychain show up in the "Keychains" list in Keychain Access..

Isomerous answered 6/3, 2014 at 19:50 Comment(3)
Thanks! Spent whole day wondering why our build script failed after upgrading to 10.9. This is a super lifesaver, thumbs down for stupid Apple bugs/"API changes".Isisiskenderun
I believe I may be having this same problem with a slightly different setup... My login.keychain does not appear in Keychain Access. If I add it from the File menu it appears in the list, and it appears in bold which suggests it is the default. However, if I exit Keychain Access and re-open it, it's gone. WWG's answer suggests that there is some other file somewhere that might be causing the problem. Where is this list stored? I also believe that this problem is due to permissions, because I've had a boatload of permissions problems.Atypical
Seriously life savior :)Coffey

© 2022 - 2024 — McMap. All rights reserved.