{"id":100,"date":"2006-08-13T10:16:22","date_gmt":"2006-08-13T06:16:22","guid":{"rendered":"https:\/\/kunaldua.local\/blog\/?p=100"},"modified":"2006-08-13T10:16:22","modified_gmt":"2006-08-13T06:16:22","slug":"reset-system-keychain-password","status":"publish","type":"post","link":"https:\/\/kunaldua.com\/blog\/2006\/08\/13\/reset-system-keychain-password\/","title":{"rendered":"Reset system keychain password"},"content":{"rendered":"<p>I have spent considerable amount of time (over YM) the past two weekends trying to help me dad get his Windows desktop to connect to the WiFi network I have running back home. The process has been a lot of pain and he&#8217;s still unable to connect, but this post is not to whine about what&#8217;s wrong with this Windows world. As you would expect, amongst other things, I needed to tell him the SSID and WEP key for the network and of course Keychain spoilt as we are, I didn&#8217;t remember either. No big deal, I just went into the Network Preferences and told him the SSID of the Wireless Network I have setup Airport to join in the &#8220;Home&#8221; location.<\/p>\n<p>Now there&#8217;s the password as well, but to see it I&#8217;ll need to use Keychain, our trusted password keeper. I run Keychain and can see all the passwords except the one I need &#8211; Murphy&#8217;s law? Not quite, because I can&#8217;t see any of the Airport passwords. Well, that&#8217;s strange. I look around at various websites but nothing tells me where our trusted Airport passwords might be. I spot the &#8220;Show Keychains&#8221; button (it&#8217;s right there, duh!) and click on it and viola, a drawer pulls out and tells me I am looking at the &#8220;login&#8221; keychain and there&#8217;s another keychain called &#8220;system&#8221;. As you would expect, the Airport passwords are in the other keychain. So far so good, although the existence of another keychain could have been more &#8220;visible&#8221;. Anyways, the &#8220;Show Keychains&#8221; button was &#8220;right there&#8221; so I would let this one go.<\/p>\n<p>I selected my network and tried to &#8220;Show password&#8221; but it just wouldn&#8217;t accept my login password (and yes I have administrator privileges). This while the user keychain quite happily accepted my password. I looked this problem up and found that the reason was that I had changed my login password since installation. Aha, so what this means is that while the user keychain password (automatically) changes when you change your login password, the same doesn&#8217;t hold true for the system keychain. I presume the system keychain would unlock with my old login password &#8211; if only I could remember it!<\/p>\n<p>I tried to &#8220;Repair&#8221; the keychain using the &#8220;Synchronize login keychain password&#8221; option but apparently that&#8217;s only for your &#8220;user&#8221; keychains. I tried the booting from Install DVD and resetting the user password routine but no cigar. I was getting really irritated at this point and had me dad (there&#8217;s me trying to write Scouse again) hanging by the chat window for the best part of 30 minutes waiting for the password. That was when the command line geek in me finally decided to show up.<\/p>\n<p>The basic idea is to &#8220;fool&#8221; Keychain into thinking your system keychain is your user keychain. If you are comfortable with the command line you can probably take it from there (do not forget to backup before you attempt anything) but if you&#8217;re not I&#8217;ll hold your hand until you are done. So here we go, here&#8217;s how to reset your system keychain password (works in Panther, no reason it shouldn&#8217;t in Tiger):<\/p>\n<p>1) Quit Keychain Access<br \/>\nJust in case, quit Keychain Access if it is running.<\/p>\n<p>2) Fire up Terminal<br \/>\nAvailable typically in Application\/ Utilities<\/p>\n<p>3) Backup your keychains<br \/>\n<code>$ cp ~\/Library\/Keychains\/login.keychain ~<br \/>\n$ cp \/Library\/Keychains\/system.keychain ~<\/code><\/p>\n<p>4) Replace login.keychain with system.keychain<br \/>\n<code>$ cp \/Library\/Keychains\/system.keychain ~\/Library\/Keychains\/login.keychain<\/code><\/p>\n<p>5) Run Keychain Access and verify that the login keychain is actually your &#8220;system&#8221; keychain (i.e. both keychains are same). Now goto Keychain First Aid in the Window menu and verify that &#8220;Synchronize login keychain password&#8221; option is selected. Just to be sure do a &#8220;verify&#8221; and you&#8217;ll be informed that the password needs to be changed. Go ahead and do the actual repair.<\/p>\n<p>6) Quit Keychain Access<\/p>\n<p>7) Copy the system keychain to it&#8217;s original place and restore the user keychain<br \/>\n<code>$ sudo cp ~\/Library\/Keychains\/login.keychain \/Library\/Keychains\/system.keychain<br \/>\n$ cp ~\/login.keychain ~\/Library\/Keychains\/login.keychain<\/code><\/p>\n<p>8) Fire open Keychain Access and you should be able to unlock the System keychain with your login password.<\/p>\n<p>There &#8211; you are good to go!<\/p>\n<p>Just in case something goes wrong, you can go back to your old keychains:<br \/>\n<code>$ sudo cp ~\/system.keychain \/Library\/Keychains\/system.keychain<br \/>\n$ cp ~\/login.keychain ~\/Library\/Keychains\/login.keychain<\/code><\/p>\n<p>Well, atleast something good came out of the Windows pain (in the form of this post). Not really because we would have needed the password even if the process was easier, but let\u00e2\u20ac\u2122s pretend otherwise.<\/p>\n<hr \/>\n<p>So where does that leave our keychains as far as security is concerned. Does that mean if you somehow manage to lay your hands on someone else&#8217;s keychain, you just reset it&#8217;s password and gain access to all the information inside it? Or is there some &#8220;system specific&#8221; information that is stored as part of the keychain that this synchronize login keychain password option looks into as well to ensure that you are not resetting someone else&#8217;s keychain?<\/p>\n<p>Unfortunately I do not have access to another OS X install, so I can&#8217;t test that. I&#8217;ll see if I can have someone send me a &#8220;junk&#8221; keychain from their system and try to repair that. Or you can test the same at home if you have multiple OS X installs or download <a href=\"http:\/\/www.kunaldua.com\/files\/junk.keychain\">this keychain<\/a> I created with nothing but a note inside and see if you can get it to synch with your login password. Please share your results.<\/p>\n<p>Edit: Rest in peace (no puns intended), your keychains are safe. Thanks to AHM who wrote in to confirm he couldn&#8217;t reset the junk.keychain from my system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have spent considerable amount of time (over YM) the past two weekends trying to help me dad get his Windows desktop to connect to the WiFi network I have running back home. The process has been a lot of pain and he&#8217;s still unable to connect, but this post is not to whine about<a class=\"more-link\" href=\"https:\/\/kunaldua.com\/blog\/2006\/08\/13\/reset-system-keychain-password\/\">Continue reading <span class=\"screen-reader-text\">&#8220;Reset system keychain password&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[2],"tags":[],"class_list":["post-100","post","type-post","status-publish","format-standard","hentry","category-apple","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/kunaldua.com\/blog\/wp-json\/wp\/v2\/posts\/100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kunaldua.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kunaldua.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kunaldua.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kunaldua.com\/blog\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":0,"href":"https:\/\/kunaldua.com\/blog\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"wp:attachment":[{"href":"https:\/\/kunaldua.com\/blog\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kunaldua.com\/blog\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kunaldua.com\/blog\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}