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

谁都会走 提交于 2021-02-17 20:14:16

问题


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?


回答1:


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..



来源:https://stackoverflow.com/questions/20391911/os-x-keychain-not-visible-to-keychain-access-app-in-mavericks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!