Re: scripting keychain access - login keychain
Re: scripting keychain access - login keychain
- Subject: Re: scripting keychain access - login keychain
- From: travis n <email@hidden>
- Date: Wed, 12 May 2004 19:31:33 -0500
Greetings John and thanks for the post.
Did you did an upgrade to 10.3.x or an clean/archive install.
It was common for 10.2.x to name the default keychain with the
username, but if a fresh install of 10.3 is done, it creates
login.keychain as the default keychain.
Either way, I have tried to get around this (as I don't know what the
users of this script will have) by using the current keychain term,
that returns login.keychain for me, which is my default keychain.
tell application "Keychain Scripting"
set defaultKeychain to current keychain
set uName to keys of defaultKeychain
end tell
Does this little snippet get the keys for you on your system?
Thanks.
-travis n
_____________________
As I opened new volumes and turned their pages, I sensed the profound
sorrow of thousands of illustrators from hundreds of cities large and
small, each with a distinctive temperament, each painting under the
patronage of a different cruel shah, khan, or chieftain, each
displaying his talent and succumbing to blindness.
-from "My Name is Red" by Orhan Pamuk
On May 12, 2004, at 3:53 PM, John Stewart wrote:
On 05/12/04 at -0500 travis n said this
Thanks for your reply Gnarlie.
Indeed, I have seen you posts here and had used your script as
somewhat
of a reference.
......
tell application "Keychain Scripting"
set theKeychain to keychain theUserID
set theKeys to every AppleShare key in theKeychain
end tell
......
in your case, you seem to be choosing the keychain that is named for
the user, this is not the case for the current keychain in 10.3.x
which
is default named login.keychain. I used your snippet above with that
modification and got the error I spoke of. However, if I use your
snippet to query against another keychain, it works great... ?
thanks.
OMM the folloowing script returns 2 items neither of which is named
login.keychain. I'm using OS X
10.3.3.
tell application "Keychain Scripting" to every keychain
--> {keychain "john" of application "Keychain Scripting", keychain
"System.keychain" of application
"Keychain Scripting"}
Could it be you are using the wrong keychain name in your tests?
Since I never directly supplied a name for either of these keychains
they could both be considered
"default" with keychain "john" being the current keychain.
JBS
--
If Barbie is so popular, why do you have to buy her friends?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.