12

After preforming a Mavericks-Mavericks migration using Migration Assistant, I have a "Local Items" Keychain on my new machine in which many (perhaps most) items are out of date (using old passwords), and some are missing altogether. While I have access to a copy of the entire contents of the ~/Library/Keychains/ directory from my old machine, which presumably contains all the information I'm missing, I see no way of importing that information into my new machine.

How can I import the "Local Items" from my old Keychain into the Keychain on my new machine?

2
  • Note that it also appears that the relevant (i.e. original) information also moved my Migration Assistant into a folder in the target machine's Keychains folder named for the GUID of the source machine; but there appears to be no way to access that information.
    – orome
    Commented Aug 23, 2014 at 23:59
  • 2
    5 Years later and still users get screwed by this. Did you find any solution? I'd love to know how the encryption key is derived! But I suspect having my passwords back is pretty much a dream from now on. Also interesting to mention, that mail saves passwords in there as well Commented Nov 1, 2019 at 17:26

5 Answers 5

5

I just managed to get my keys to my new mac (this only works if you still have access to the old Mac and can boot it up):

  • (on the old mac) Remove your current user's password
  • Create a new keychain (without a password)
  • Copy all keys in "Local Items" to your new keychain
  • Copy the keychain to the new mac
  • (on the new mac) Remove your current user's password
  • Add the new keychain file
  • Copy all keys in the new keychain to "Local Items"
  • Delete the new keychain
  • Don't forget to set a password again after that

It's a bit annoying as you have to click "Allow" for EACH item in the keychain but well, it's the only thing I found that works.

3
  • Just to add to this, you can fine a keychains in ~/Library/Keychains
    – Datageek
    Commented Aug 9, 2019 at 11:46
  • 1
    In Mojave there is no way to copy web passwords from Local Items unfortunately. Commented Aug 29, 2019 at 6:41
  • 1
    How do you disable a user password? I could only disable the lock screen password but the password still exists and is affiliated w my user...
    – gen
    Commented Oct 25, 2020 at 18:10
1

Assuming the old Mac works (or at least can start in Target Disk Mode and then be connected to another Mac and started up from using Option-Boot), turning on iCloud Keychain should sync all the items in the "Local Items" keychain to your iCloud account, and then enabling it on the new Mac would merge all the items between your iCloud account and the new Mac's "Local Items".

Here are some specific steps:

  1. Sign in to iCloud with the old mac

  2. Sign in to iCloud with the new mac (using the same AppleId as step 1)

  3. Enable "Keychain" to be synced to iCloud on the old mac. This will cause every item in the "local items" keychain to get uploaded to Apple's iCloud. It will also make the "local items" keychain disappear on the old mac and instead an "iCloud" keychain will appear in its place.

  4. Enable "Keychain" to be synced to iCloud on the new mac. This will make the "local items" keychain disappear on the new mac and instead an "iCloud" keychain will appear in its place. Every item from the keychain stored in iCloud to get downloaded into the iCloud keychain on the new mac.

  5. Disable iCloud syncing of "Keychain" on the old mac and if prompted, opt to keep a copy of the keychain on the mac. This will make the "iCloud" keychain disappear but "local items" will appear again.

  6. Disable iCloud syncing of "Keychain" on the new mac and if prompted, opt to keep a copy of the keychain on the mac. This will make the "iCloud" keychain disappear but "local items" will appear again.

According to this Apple Support Article, if you "turn off iCloud Keychain on all your devices" then "your iCloud Keychain is removed from the cloud."

3
  • Have you verified that it works in target disk mode?
    – whoKnows
    Commented Aug 27, 2021 at 19:39
  • This doesn't work properly. Seems that the new mac's local items data doesn't "disappear," it still exists and if it diverges from the items that are to be synced, then the sync will never fully complete. Tons of missing items from my iCloud keychain. And be very careful NOT to reset the keychains using the Keychain Access app, or else it will delete data stored in the cloud and then you will never get it back from any machine.
    – 2rs2ts
    Commented May 4, 2022 at 19:17
  • This seems to be the only working way to copy passwords from the Local Items, thanks! Commented Oct 7 at 23:43
0

A combination of the other answers worked for me...

  1. Select all keychain items you want to keep, right-click, "Copy 123 items"
  2. Right-click the keychain they came from and change the password to be something you can type easily (you'll be typing it 123 times...)
  3. Select your iCloud Keychain, right-click over the items, "Paste 123 items"
  4. Enter your keychain password and press Enter... repeat 123 times.
  5. Your new Mac should get all of those passwords when iCloud re-syncs.
1
  • 2
    That doesn't work anymore, unfortunately: "An error has occurred. Unable to add an item to the current keychain." Commented Dec 8, 2021 at 20:29
0

Found a simple answer that worked instantly and seems fine:

On the old machine copy the Keychains folder out of your user Library (~/Library/Keychains) and onto a flash drive or other secure transfer method (it is a file with all your passwords so be careful with it).

Move flash drive to the new machine or using the method of your choice get the copied folder there.

Open Keychain Access on new machine, from the File menu select "add keychain...", select the Keychains folder from the old machine.

This created a custom keychain with all the login items from the old machine. Unlock it (right click on the name) to keep from having to enter double passwords every time you use it.

3
  • Lost me at moving the keychain to another machine!
    – orome
    Commented Jul 7, 2021 at 19:45
  • Its the folder with the keychain in it. Used a flash drive, secure; erase it afterward.
    – rebusB
    Commented Jul 7, 2021 at 19:46
  • Yes, and that folder isn't going anywhere!
    – orome
    Commented Jul 7, 2021 at 20:02
-1

Since Mavericks this got very complicated because iCloud keychain is now default. Luckily, this answer helped me.

You just need to export all local passwords from the Safari → Preferences → Passwords and import them on the new Mac. Do not forget to remove the CSV file with passwords!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .