Apologies for the vague title – I couldn't really think of any other way to sum up my problem.
I've been trying all day to work my own way around this issue but I've ultimately hit a brick wall so could do with some help. It's rather complicated so I'll explain from the beginning but try to give only the important details.
So some time ago I bought a 2012 MacBook Pro second hand, which came with a blank password. On the login screen it would just show up with apple I would just press enter to log in. I was not aware of the existence of an Admin account or password.
Today I was trying to restore my iPod when it asked me for my password, it wouldn't accept the blank password when I pressed enter. I wondered if it could have wanted an admin password but it was asking for the password for my user account 'Apple'. I also wondered if it could be possible that there was a password but that it was set not to ask me for it, which didn't seem to be the case in settings.
I concluded that probably the blank password was confusing the system in some way but that either way if I could change the password or create one if there was none that either way it should work out.
After some research I used Disk Utility to reset the password for the user account. I discovered an Admin account on the drop down so I reset the password for that as well, thinking that if the first didn't work then that should do the trick.
When I rebooted there was a slight difference on the login screen; rather than just having the 'Apple' account there, there was also 'More' next to it. Clicking on more brought up username and password fields, which did not work with 'Admin' and the admin password that I had set.
I logged into my account fine, however the Keychain password of course no longer matched. I tried to change the Keychain password using a blank password field (which I presume it must have been, to match with the previously blank user login password) and with my new login password, but neither worked. I also tried changing my user password back to a blank one but that also failed.
I don't necessarily need to gain access to the keychain as most if not all the data is stored in Chrome anyway. I realised this just now while writing but I will continue the question as it may be helpful for others in the future.
I would also just be interested to know why all these issues came up, if a blank password can cause such problems it seems like a bit of a design floor. It also dawned on me that most of the passwords listed I haven't been on since owning this laptop, so does it just download the data from chrome? What's the point in that?
If I just log into chrome anyway and it does the work for me then I have no need for this Keychain encryption. If anything it's just one more place (albeit a much more secure one it seems) from where my data could be compromised.
I would also be interested to know why I am unable to log into this Admin account.
Best Answer
The "admin" account you set a password for was "System Administrator (root)". You'll either need to type "System Administrator", or "root" as the user name. This "super user" account is part of the operating system, and can do whatever it wants - including things that have extremely negative consequences. I recommend disabling it. See OS X Mountain Lion: Enable and disable the root user[1] for how.
If you want to fix the keychain and can't figure out what password it uses, open Keychain Access and click the "Reset my default keychain" button on the General tab of Preferences. If a problem with "Local Items" occurs after rebooting, see this article.
As for the use of empty passwords, that is probably on purpose. You can't start a new user with no password anymore, and you can't unlock Security and Privacy system preferences without a password.
And finally, Chrome doesn't have a keychain to make use of on other operating systems, so if it can't use the user account's keychain it makes sense to me that it'll fall back on its own internal storage.
[1] It has been the same method for a long time, you can ignore the "Mountain Lion" in the title.