Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

keychain dump

keychain is nice, but you need to be able to dump its contents. i see no way to export the contents to a readable file. i know i can backup the keychain, but that is not the same thing. you still need the keychain app to access the information. i don't want to invest the time to put in 100's of items if i cannot get them out.

Posted on Feb 16, 2008 2:00 PM

Reply
11 replies

Feb 17, 2008 3:40 PM in response to Tony T1

Tony T1 wrote:
Are you trying to dump the keychain contents to a text file so that the passwords are readable?


Close, he wants a safe file format for the keychain contents so that he can keep it as a secure easily recoverable file. Security is nothing without the ability to recover information.

Sorry, I have no idea what will do what you want.

Feb 17, 2008 7:22 PM in response to user1724

I have a simple AppleScript which generates a tab-delimited text file, named Passwords saved to the Desktop containing the name, account username, and password for each key in my login.keychain. The file is a backup for all generic and webpage keys. Note that it *hasn't been tested in Leopard*, but should do the job.

Cut and paste it into Script Editor, compile it, and run it. Select the right-hand option in the dialog boxes that pop up; either allow always or allow once, whichever is not grayed out.

Paste the file's contents into Excel, sort it by name, clean it up a bit, print it out, and you have a permanent record of each password item (key), sorted by name, username, and password. Store it in a secure location.

<script>
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) & tab & ¬
(account of aKey) & tab & (password of aKey) & return) as text
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
<end script>

Tested in Tiger and Leopard.

Feb 18, 2008 7:17 AM in response to amulz

amulz wrote:
Tony T1 wrote:
Are you trying to dump the keychain contents to a text file so that the passwords are readable?


Close, he wants a safe file format for the keychain contents so that he can keep it as a secure easily recoverable file. Security is nothing without the ability to recover information.

Sorry, I have no idea what will do what you want.


You hit the nail right on the head.

keychain dump

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.