how do I get passwords out of my keychain-2.db time machine backup?

I have a keychain-2.db file that I fished out of my time machine backup (macbook air m2 ventura 13.3.1 (a)). How can I read my web passwords from there?


For why I'm trying to do this: how to restore disappeared saved password… - Apple Community


For context: the reason I think the passwords are actually in there is that when I fire up "keychain access", there seem to be two kinds of keychains: ones that are backed by .keychain-db files (and are accessible via /usr/bin/security) and the "Local Items" keychains that are apparently backed by keychain-2.db sqlite db (according to https://www.forensicfocus.com/articles/a-deep-dive-into-apple-keychain-decryption/). Looking at my other user accounts on this mac, the web passwords I'm trying to restore are listed in the "Local Items" section as kind="Wed form password", not in the "login" or other keychains.


I know how to load a sqlite db, list the schema of tables, and run queries but it's unclear to me where my passwords might reside or how to read them. I know the previous and current password of the account and also the icloud account that might be involved. I'm also admin on the machine although the account I'm working on is a separate non-admin account.


For an older thread on this question that references scripts that are no longer available online see: How do I get passwords out of keychain-2.… - Apple Community


PS: fwiw that forensicfocus.com link I included appears to be partially addressed to crackers/cyber people which is not my case at all. I'm just trying to recover my own passwords which disappeared without warning after what I thought was a perfectly non-risky macOS operation of changing the password of a local user (I control both accounts, I'm just using two of them as a hygienic separation).

Posted on May 7, 2023 11:40 PM

Reply

Similar questions

4 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how do I get passwords out of my keychain-2.db time machine backup?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.