This is a simple script for managing an encrypted password database. It has two features in particular:
Before using userpass for the first time, you'll need to create yourself a gpg encryption key, and you'll want to configure gpg to help userpass work better. Here are the steps:
To get started, see --help:
$ userpass --help usage: userpass [-ahnv] pattern... -a --add Add a username/password --dir Set userpass database directory (/home/agriffis/skel) (alternatively set USERPASS_DIR in env) --gpg path Set gpg binary (/usr/bin/gpg) -h --help Show this help message --host name Set alternate hostname (olive) -l --list-keys List the known accounts -n --new Create a new account -r --recipient Set alternate encrypt-to recipient (20104EB0) -V --version Show version information
To create a new account in the database (and create the database, for that matter), specify the identifier you want to use for it on the command-line. For example, to create a record for a login at the Linux Weekly News:
$ userpass --new 'lwn.net (Linux Weekly News)' username? agriffis password? supersecret
To look up the password:
$ userpass lwn decryption passphrase? gpgpassword lwn.net (Linux Weekly News) agriffis supersecret
To update the password in the future:
$ userpass --add lwn decryption passphrase? gpgpassword matched lwn.net (Linux Weekly News) username [agriffis]? password? ultrasecret