Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Command line access to keychain



On 12/21/04 5:00 PM, "Ken McLeod" <email@hidden> wrote:

> 
> /usr/bin/security has some rudimentary support for this.
> 
> For example, /usr/bin/security find-generic-password -a thecloud -s
> iTools -g
> shows me my saved password with that account name and service name.
> 
> One gotcha here is that the system currently needs to put up UI to
> confirm access to the keychain. If the ACL for the keychain item you're
> accessing requires the keychain password to be entered in order to
> access it, and the session in which you're running is *not* a graphic
> (login window) session, then your access will fail. You should be able
> to set this up once and click "Always Allow," assuming the process
> running your script does not change.


Thanks.  This appears to work OK for displaying items from the command line.
Unfortunately it always sends it's output to stderr which makes it harder to
catch the output and extract the actual password text from it.  Grrrr.

AppleScript may be a workable alternative as it looks like it might be
easier to get ahold of the actual password text.

Scott


Sent using the Microsoft Entourage 2004 for Mac Test Drive.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Apple-cdsa mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/apple-cdsa/email@hidden

This email sent to email@hidden

References: 
 >Re: Command line access to keychain (From: Ken McLeod <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.