Re: password managers
On Tue, Jun 15, 2004 at 12:46:13AM +0200, Stephan Dietl wrote:
> Hello!
>
> andrew lattis <debian@naranek.org> schrieb:
> > what does everyone else use to keep track of all there passwords?
>
> Following an article of Martin Joey Schulze in a german magazine i send
> a mail with the password encryted for myself to me and use it via mutt.
>
I used gringotts, that someone mentioned.
Some of the applications I run use kwallet, that seems similar to what
Russell Cooker described for OS X.
But I use vim (+gpg, that is). Which is a solution similar to the one
Stephan talks about, but without having to mail yourself every password.
I took it from somewhere I can't remember so credit goes to whoever wrote it.
What this does is:
- If the file extension is .gpg or .asc, call gpg --decrypt to get the real contents
- Edit the file
- Call gpg --encrypt before writing to disk.
So you keep everything encrypted with your GPG key.
>From my .vimrc:
----- cut ----
augroup encrypted
au!
" First make sure nothing is written to ~/.viminfo while editing
" an encrypted file.
autocmd BufReadPre,FileReadPre *.gpg,*.asc set viminfo=
" We don't want a swap file, as it writes unencrypted data to disk.
autocmd BufReadPre,FileReadPre *.gpg,*.asc set noswapfile
" Switch to binary mode to read the encrypted file.
autocmd BufReadPre,FileReadPre *.gpg set bin
autocmd BufReadPre,FileReadPre *.gpg,*.asc let ch_save = &ch|set ch=2
autocmd BufReadPost,FileReadPost *.gpg,*.asc
\ '[,']!sh -c 'gpg --decrypt 2> /dev/null'
" Switch to normal mode for editing
autocmd BufReadPost,FileReadPost *.gpg set nobin
autocmd BufReadPost,FileReadPost *.gpg,*.asc let &ch = ch_save|unlet ch_save
autocmd BufReadPost,FileReadPost *.gpg,*.asc
\ execute ":doautocmd BufReadPost " . expand("%:r")
" Convert all text to encrypted text before writing
autocmd BufWritePre,FileWritePre *.gpg
\ '[,']!sh -c 'gpg --default-recipient-self -e 2>/dev/null'
autocmd BufWritePre,FileWritePre *.gpg set bin
autocmd BufWritePre,FileWritePre *.asc
\ '[,']!sh -c 'gpg --default-recipient-self -e -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 *.gpg,*.asc u
autocmd BufWritePost,FileWritePost *.gpg set nobin
augroup END
--- cut ----
--
Alberto Gonzalez Iniesta | BOFH excuse #399:
agi@(agi.as|debian.org) | We are a 100% Microsoft Shop.
Encrypted mail preferred |
Key fingerprint = 9782 04E7 2B75 405C F5E9 0C81 C514 AF8E 4BA4 01C3
Reply to: