[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Nice GUI/CLI Password Manager for Linux



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 25-Jan-08, at 1:25 PM, Joey Hess wrote:

Amit Uttamchandani wrote:
Recently moved from Mac to Debian Linux. I am looking for a nice and powerful FLOSS password manager similar to "Keychain" on Mac OS X.

I preferably would want a CLI tool...so I could remote login using SSH and look at some passwords that I have forgotten.

vim + gpg

vim can be configured to automatically use gpg to decrypt *.gpg files
when they're read and re-encrypt thenm when saving. The decrypted data
never touches the disk (though encrypting your swap partition too wouldn't
hurt).

Dump the following in your .vimrc:

" Transparent editing of gpg encrypted files.
" By Wouter Hanegraaff <wouter@blub.net>


My variation of that....  uses openssl and blowfish....

Note - don't do :wq if you use this - because if the passwords
don't match it doesn't write it - but it does quit :-)

You have to get in the habit of :w and then :q

Brian

- ------------------------------------------------------------

" Transparent editing of bf encrypted files.
" Originally By Wouter Hanegraaff <wouter@blub.net>
" with alterations for bf by bmckee
" note the file must be encrypted with the -a and -salt options
augroup encrypted
    au!

    " First make sure nothing is written to ~/.viminfo while editing
    " an encrypted file.
    autocmd BufReadPre,FileReadPre      *.bf set viminfo=
    " We don't want a swap file, as it writes unencrypted data to disk
    autocmd BufReadPre,FileReadPre      *.bf set nobackup
    " We don't want a backup
    autocmd BufReadPre,FileReadPre      *.bf set nowritebackup
    " We don't want an inprogress backup either
    autocmd BufReadPre,FileReadPre      *.bf set noswapfile
    " Switch to binary mode to read the encrypted file
    autocmd BufReadPre,FileReadPre      *.bf set bin
    autocmd BufReadPre,FileReadPre      *.bf let ch_save = &ch|set ch=2
autocmd BufReadPost,FileReadPost *.bf '[,']!openssl bf -d - salt -a 2> /dev/null
    " Switch to normal mode for editing
    autocmd BufReadPost,FileReadPost    *.bf set nobin
autocmd BufReadPost,FileReadPost *.bf let &ch = ch_save|unlet ch_save autocmd BufReadPost,FileReadPost *.bf execute ":doautocmd BufReadPost " . expand("%:r")
    " Convert all text to encrypted text before writing
autocmd BufWritePre,FileWritePre *.bf '[,']!openssl enc -bf - -salt -a 2>/dev/null
    " Undo the encryption so we are back in the normal text, directly
    " after the file has been written.
    autocmd BufWritePost,FileWritePost    *.bf   u
augroup END

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Verify this email or encrypt your email for free - see gnupg.org

iD8DBQFHmjJ0GnOmb9xIQHQRArnWAJsFRdv+18H3AUb1jbmSn6hf5SdIbgCg6Uh1
wc4sHdso8IerMjVyxXe7+/M=
=gQvF
-----END PGP SIGNATURE-----


Reply to: