Copy Keychain Logins & Passwords from One Mac to Another
Most Mac users are best served by using the easy Migration Assistant tool to copy all files, folders, preferences, and login data from one computer to another. This isn’t always an option though, perhaps because a hard drive is failing, or maybe you just prefer to manually migrate only very specific data from an old Mac to a new one. Keychain login data and keychain passwords can be copied from one Mac to another Mac manually this way, if need be.
Aimed at advanced users, this article will focus on transferring all passwords and login information you have stored on one Mac to another Mac, effectively transferring all crucial login data that is handled by Keychain.
How to Transfer Keychain Data Between Macs
- From the Mac OS X Finder of the Mac containing the original keychain file, hit Command+Shift+G to bring up Go To Folder and enter the following path:
- Copy the user “login.keychain” file to the new Mac, do this with AirDrop, Ethernet, USB, etc
- On the new Mac, hit Command+Spacebar to open Spotlight and type “Keychain Access” then hit return, this launches the Keychain manager app
- Pull down the “File” menu and select “Add Keychain” and browse to the keychain file you copied to the new Mac, selecting Add to import the stored keychain data to the new Mac
With the keychain data imported, all of the stored logins and passwords from the old Mac should be imported into the new Mac and ready to use. You can test it by going to a web page or app where password data is typically stored and verifying that it is automatically entered.
If you have problems with Mac OS X not remembering passwords after importing the old keychain, use the Repair feature in Keychain Access to get everything back to normal.
You can copy the keychain data from one Mac to another Mac using just about any method you want to transfer the data, whether that is AirDrop, a wired network connection with SMB or AFP sharing, ssh or scp, a USB flash drive or external hard drive, or any other similar data transfer mechanism.
If you are performing the keychain transfer from a Mac that can’t be booted, or if you want to copy keychain data from a backup of a hard drive, you could mount the drive separately, or find the keychain data in a relevant backup, and locate the keychain password file data directly by navigating to the following directory:
Changing USERNAME to the user name of the individual who owns the keychain file.
Mac Keychain Data Location
That same directory is actually where the keychain data is stored on all Macs with MacOS (macOS) or Mac OS X. Thus, the directory path and keychain data location on a Mac is at the following location:
Replacing ‘USERNAME’ with the name of the user, for example username “Paul” would look like:
This is from the root directory / but for an active user account you can use the ~ tilde shortcut for the user home directory a well:
You can transfer and copy Keychain data from various computers this way by finding the keychain data files and copying them to other machines.
Finally, if you used external media like a USB drive to transfer the keychain file, you will probably want to go manually delete that since it’s never a good idea to have login information floating around, particularly on any unencrypted drive or volume.