Topic : Exporting Keychain info

Topic Archived This topic has been archived - replies are not allowed.


This question is answered. "Helpful" answers available: 2 . "Solved" answers available: 1 .



            Permlink
            Replies : 5 - Pages : 1 - Last Post : Nov 18, 2005 5:48 AM by: Gurukarm Khalsa
Gurukarm Khalsa

Posts: 5
Registered: Aug 8, 2005
Exporting Keychain info
Posted: Nov 15, 2005 1:28 PM
 

I have been using Keychain Access to save internet passwords and some other types of passwords, on my work computer. I'm leaving this job soon for parts as yet unknown, but would like to export or somehow save all this password info to be able to use later. I have no way of knowing at this point if I'll be on a Mac at a new job (PC at home :-( ) so just saving the Keychains folder to a flash drive or somewhere might do me no good.

Is there any way to export Keychain passwords? Or, at the very least, Grab a pic of the window so I can print out the pic and write down the relevant passwords?

Thanks for your help!

   
Andbrowny


Posts: 751
From: New Zealand
Registered: Jun 28, 2005
Re: Exporting Keychain info
Posted: Nov 15, 2005 6:32 PM   in response to: Gurukarm Khalsa
 

Hi Gurukarm you can take screen shots of your passwords by holding apple+shift+3 or a selection of the screen with apple+shift+4.This will allow you at least to print them out.I'm not sure about the export function in keychain, but looking into it.

Cheers.

iBookG4   Mac OS X (10.4.3)   & .local AD ; WINXP
baltwo


Posts: 23,274
From: San Diego, CA
Registered: May 8, 2005
Re: Exporting Keychain info
Posted: Nov 16, 2005 12:29 AM   in response to: Andbrowny
 

This Applescript will do it. It puts the results into a plain text file named "Passwords" onto the desktop. You'll have to manually strip some extraneous characters to end up with a readable listing. The first time through you'll have to click the Allow Always and/or Allow Once button for each username/password combo, but it works well. Copy it into Script Editor and give it a shot.

set osXKeychainScriptingPath to ¬
(path to scripting additions from system domain as Unicode text) ¬
& "Keychain Scripting.app:" -- one line

set theSecuridPIN to {}

tell application "Keychain Scripting" to launch
tell application "Keychain Access" to launch

using terms from application "Keychain Scripting"
tell application osXKeychainScriptingPath
set KeyList to every Internet key of current keychain
repeat with aKey in KeyList
set theSecuridPIN to theSecuridPIN & (name of aKey) & ¬
(account of aKey) & (password of aKey) & return--one line
end repeat
end tell
end using terms from

tell application "Keychain Scripting" to quit
tell application "Keychain Access" to quit

tell application "Finder"
open for access file (((path to desktop folder) as text) & "Passwords") with write permission
set theFile to result
write theSecuridPIN to theFile
close access theFile
end tell

G4 450 MP Gigabit   Mac OS X (10.4.3)  
Gurukarm Khalsa

Posts: 5
Registered: Aug 8, 2005
Re: Exporting Keychain info
Posted: Nov 16, 2005 6:29 AM   in response to: Andbrowny
 

Thanks Andbrowny - I had tried to use apple+shift+4 and it's disabled for Keychain Access (security measure, I guess - Grab was too) but, apple+shift+3 for the entire screen worked! I can work with that :-) Thanks for reminding me to try the "bigger picture".

I'm also going to try the scripting solution baltwo suggests - I'm a total beginner to scripting, so it will be an interesting exercise.

Thanks to you both.

G5   Mac OS X (10.4.2)  
Tagbert

Posts: 5
Registered: Nov 16, 2005
Re: Exporting Keychain info
Posted: Nov 17, 2005 9:43 PM   in response to: Gurukarm Khalsa
 

Thanks for the help exporting from Keychain. Now, do you know how to import passwords into Keychain? I'm a switcher and need to bring over an extensive list of passwords for various sites and applications. I don't relish reentering (or even copy-paste) all those records.

I see import and export menu commands, but they only seem to apply for certificates. Same for any searching I do in these discussion groups.

Mac Mini 1.42GHz   Mac OS X (10.4.3)  
Gurukarm Khalsa

Posts: 5
Registered: Aug 8, 2005
Re: Exporting Keychain info
Posted: Nov 18, 2005 5:48 AM   in response to: baltwo
 

Just as a followup - I did use the script you posted, baltwo, and it was great! There was quite a bit of cleanup to do, as you mentioned, but the good thing about it was I was then able to reorganize all the sites and passwords into groups that made sense to me. Very very helpful!

Thanks so much.