Re: scripting keychain access - login keychain
Re: scripting keychain access - login keychain
- Subject: Re: scripting keychain access - login keychain
- From: Gnarlodious <email@hidden>
- Date: Wed, 12 May 2004 10:05:24 -0600
OK, it looks like 10.2 used the default keychain named username while 10.3
changed it to login.keychain. My keychain is leftover from 10.2 so it's
named after me. You can either change your keychain's name or change the
script.
My login.keychain file is empty, apparently it has no functionality if the
default keychain is set to another in preferences. Also, older keychains did
not have the .keychain extension so 10.2 could not launch the file in it's
application. I've added the extension to all my keychain files and now they
are doubleclickable.
Thanks for the headsup on that.
Entity travis n spoke thus:
>
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.
>
>
-travis n
>
>
_____________________
>
>
If your face were depicted in this fashion only once, no one would ever
>
be able to forget you ... For if a lover's face survives emblazoned on
>
your heart, the world is still your home.
>
>
-from "My Name is Red" by Orhan Pamuk
>
>
On May 12, 2004, at 12:09 AM, Gnarlodious wrote:
>
>
> Take a peek at my script at:
>
> http://www.Gnarlodious.com/OSX/AppleScript/Finder-Equalize.html
>
>
>
> It includes handler "initializeValues" which mounts servers on call.
>
>
>
> Keychain scripting supplied by John Welch.
>
>
>
> -- Gnarlie
>
>
>
>
>
> Entity travis n spoke thus:
>
>
>
>> Greetings,
>
>>
>
>> I have searched the archives, but have not had success finding this
>
>> (that was tough in itself, the search is rough).
>
>>
>
>> I want to be able to get a user's .Mac username from a script, but my
>
>> attempts to access the login.keychain in 10.3.x always return an empty
>
>> set:
>
>>
>
>> tell application "Keychain Scripting"
>
>> set defaultKeychain to current keychain
>
>> set uName to keys of defaultKeychain
>
>> end tell
>
>>
>
>> the event log reports:
>
>>
>
>> tell application "Keychain Scripting"
>
>> get current keychain
>
>> current application
>
>> get current keychain
>
>> keychain "login.keychain"
>
>> get every key of keychain "login.keychain"
>
>> {}
>
>> end tell
>
>>
>
>> This same script works if I point it to another keychain...
>
>>
>
>> Any tips greatly appreciated.
>
>>
>
>> -travis n
_______________________________________________
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.