6

Some background:

I first got a Macbook Pro, 1, from my work. It was connected to the company AD. Since I had admin rights on this machine and didn't like having different AD policies forced upon me I reinstalled it to get a plain Mac OS X, free from any AD connections. 1 was then involved in an accident including water and broke. I then got a replacement Macbook, 2, which I reinstalled to get out of the AD like I did with 1. I then and transferred all data using Migration Assistant (the harddrive of 1 was not broken, however, the file system needed extensive repair).

So far, I didn't have any problems with my System Keychain. However, I then got rid of 2, after doing a Time Machine backup of it, and got a third Macbook, 3, which I wanted to do a clean install on.

Now when I try to read some wifi-passwords stored in the System keychain for 1 and 2 (by browsing to it on 1's old hard drive/the Time Machine backup of 2) on 3 I get an error message that the password I enter is incorrect. I am as sure as you could possibly be that I know the password to the account I had on 1 and 2 (I use the same password on 3) but obviously this is not the correct password to unlock the System keychain.

If I open my user keychain from 2 (from the Time Machine backup) I can unlock it using the password I used on my account on 2 (and 1 and 3). However, if I open the user keychain from 1's old harddrive I can't unlock it using the account password I used on 1. 1's water accident led to a lot of write errors on the harddrive and a lot of orphaned files but since all 1's keychains have worked on 2 I don't think the keychain files were affected.

So my question is something like: how does the OS unlock the System keychain after I login using my account password? Where does the OS find the password for the System keychain? In my user keychain? Apparantly, using the Migrations Assistant, iunlocking System is a non issue, while when I copy the keychain files manually something that is required is not transfered.

A final note: when I got 1 it probably came with some default password. It was 3 years ago so I don't remember. Can that be relevant here? Since I did a clean install (IIRC) I would be surprised but I guess there are different ways to reinstall a computer and I don't remember exactly how I did.

  • Have you tried copying the system keychain file to another user's ~/Library/Keychains folder and seeing if that user can unlock it? – bmike Jan 16 '15 at 23:16
  • Yes, but according to this apple.stackexchange.com/a/115694/31395 the System.keychain's password is stored in a file. I have that file but it is binary and I don't know how to "use it" to decode this old System.keychain. – d-b Jan 17 '15 at 7:11
  • I would rename the file to old_system and then place it in another user's ~/Library/Keychains to see if that user can unlock the file. – bmike Jan 17 '15 at 14:24
4

The login (user account) password isn't stored in keychain access, but keychain access automatically adopts the user account password as the keychain access password by default.

So, your password for keychain access is most likely the same as the login password.

There is no default password in mac, the user creates one on install. If your mac was provided already installed, there was likely an assigned password created by the admin, perhaps associated with AD. If you reinstalled OSX, it would not have wiped the password, but if you formatted the harddrive, then reinstalled OSX, you would have created a new password.

  • Thank you for your answer but you are mixing up the user keychain and the System.keychain. The unlocking of them are handled quite differently, see this answer for details apple.stackexchange.com/a/115694/31395 – d-b Jan 17 '15 at 7:12
1

You can reset the keychain password as described here:

http://support.apple.com/en-us/HT203192

From the knowledge base article:

... if you don't know your keychain password, you might need to reset your keychain.

Resetting a keychain sets aside the original default keychain file and creates a new one.

To reset your keychain in Mac OS X 10.4, Mac OS X 10.5, and Mac OS X 10.6 Snow Leopard or later:

  1. Open Keychain Access, which is in the Utilities folder within the Applications folder.
  2. From the Keychain Access menu, choose Preferences.
  3. Click General, then click Reset My Default Keychain.
  4. Authenticate with your account login password.
  5. Quit Keychain Access.
  6. Restart your computer.

NOTE: if you reset the keychain, it won't give you access to the keychain you already have.

  • You are also mixing up user.keychain and System.keychain. See my comment to apple.stackexchange.com/a/167694/31395 – d-b Jan 17 '15 at 7:13
  • You are correct, I did not consider the differences. According to the following article, if the system keychain password is unknown or lost, the keychain will need to be replaced. kb.wisc.edu/helpdesk/page.php?id=2197 – Br.Bill Jan 19 '15 at 19:20
  • I have not lost the password to the System.keychain - I still have the file - but it is unreadable. I guess I can reinstall a computer and use Migration Assistant and fix it that way but it feels like a overly complicated solution for something that should have a simpler solution? – d-b Jan 19 '15 at 19:39

You must log in to answer this question.

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