More information about the Underscore mailing list

[_] Password safekeeping & CSS/JS compression

Matt Kane ascorbic at gmail.com
Fri Mar 2 12:41:45 GMT 2007

On 2 Mar 2007, at 12:14, Tom Gidden wrote:

> On 2 Mar 2007, at 10:43, Iwein Dekoninck wrote:
>
>> Question 1: Has anybody got recommendations on strategies for keeping
>> track of usernames/passwords for things like FTP sites, Basecamp
>> accounts, server logins, etc?
>
> Sorry to sound like a broken record, but I use the Keychain feature
> of Mac OS X, which does all of the above.
>
> Hmmm. Now I'm wondering if there's a command-line FTP client that
> links in with Keychain, and if not, how easy it would be to patch the
> existing one...

If you're shell-scripting, you can use /usr/bin/security to access  
the keychain.
The keychain functions can be found in Security.framework and are  
quite simple to implement. However, with a command line app you won't  
want it popping up the "Unlock Keychain" dialog boxes. You can use  
SecKeychainSetUserInteractionAllowed to stop it displaying dialog  
boxes and SecKeychainGetStatus to see if it's unlocked. If it is,  
then you can prompt for the password on the command line then use  
SecKeychainUnlock to unlock the keychain.

M