[launchd-dev] Accessing keychain in a launchd process

Brad Reynolds bradleyjames at gmail.com
Sun Aug 10 20:55:07 PDT 2008


I have a ruby script that shells out a call similar to the following:

`security find-generic-password -ga test
/Users/brad/Library/Keychains/login.keychain`

When run from the command line I was prompted to give access to the
keychain item for the 'security' command (this security of this
concerns me but is out of scope for the question).  After granting
access via Keychain Access I can run the script and it no longer
prompts for the retrieval of the password.

When invoked from launchctl I see the following in Console:

"security: SecKeychainFindGenericPassword: User interaction is not allowed."

I tried adding launchd and launchctl to the list of programs that have
access to this password but I get the same error.  Any ideas on what
the program might be when run from launchctl?

-bradr


More information about the launchd-dev mailing list