Gpg Password Grep
- This is a small perl hack, nothing fancy..
- have your passwords in gpg encrypted files.
- generation / maintainence is easy: use vim
extraction with the pwgrep utility - ends up in X selection buffer so you can apply it with middle mouse click
example / usage
- password files are located in $HOME/.p/
- this is hardcoded (it's a small script.. easy to change)
- assume: a hostgroup called 'foo' with 2 machines: 'alpha' and 'donkey'
sample password file $HOME/.p/foo.gpg
alpha root ptZPXbQrRI3kWesiJGZwzmx alpha mysql root o4Sl3DuCRfmVzx7ywcGlI2k alpha mysql app n956i87PPmAaBWBlEPD6TI7 donkey root IODtmQ9QEnDUAyqkRMJVwPn donkey user UZQ7IWXUXnU5Ib5wcAFpB0r
- password exctraction:
$ pwgrep foo alpha mysql ## gpg password stuff ommited - nice if you use gpg-agent or similar stuff (with timeouts of course..) several results found: 0: alpha mysql root 1: alpha mysql app select a result: 0 selected alpha mysql root
- now the mysql root password of machine alpha is selected