Reputation: 225
I'm trying to unlock the Local Items keychain in OSX programmatically.
I'm unlocking login.keychain with /usr/bin/security tool. In some scenarios, unlocking login.keychain programmatically unlocks Local Items indirectly. Other times, Local Items is not unlocked and the user gets several prompts to unlock it. I need to know how to access Local Items directly, in my C program.
Unfortunately, running security list-keychain in /Library/Keychains/ does not even list the Local Items keychain. Why is that?
Is there any way to access and modify Local Items directly?
Platform: Maverick and Yosemite
Update: I have now also tried unlocking the login keychain with the security API (SecKeychainUnlock), the problem with locked Local Items still persists.
Upvotes: 3
Views: 1874
Reputation: 1
I encountered a similar issue when migrating to a new MacBook. After resetting the old one to factory settings, I found that my Keychain passwords didn’t transfer, which seems to be a common problem based on what I've seen online. Thankfully, I had a Time Machine backup and was able to recover my passwords using a tool called iChainbreaker by n0fate, available on GitHub. This can help with unlocking the macOS Local Items keychain as well. Just sharing this in case it helps anyone else facing the same issue!
Upvotes: 0
Reputation: 65
Local Item is not keychain file, it is db file which is named "keychain-2.db". You'll see it in a sub folder in ~/Library/Keychain.
Check this link: https://macmule.com/2014/03/30/the-local-items-keychain-in-mavericks/
Upvotes: 3