Manage passwords with gpgpwd

Unpacked

To order something from Amazon, you now need to enter gpgpwd get to retrieve the matching username and password. After sending the command, you are again prompted to enter your master password. As you can see from Figure 2, the tool even forgives your typos. Gpgpwd now automatically copies the required password to the clipboard (Figure 3). To prevent this from happening, just add the -C switch to the gpgpwd command line.

Figure 3: There is no need to type the password; you can simply enter it in the required fields from the clipboard – either via the context menu, as in this example, or by pressing Ctrl+V.

Based on the same principle, you can store your login credentials for any other service. Instead of the domain name, you can use any other designator. The gpgpwd set safe command, for example, would save the password named safe. The rename option lets you retroactively change the designator – for example, to correct amzn.com to amazon.com:

$ gpgpwd rename amzn.com amazon.com

To delete a password, you would use the remove command. For example, gpgpwd remove amazon.com tells the tool to forget your credentials for Amazon. After deleting the last password, GnuPG complains that the file is empty. You can safely ignore this message. To change your password for Amazon, simply overwrite it with the one you want by typing gpgpwd set amazon.com.

Conclusions

Thanks to the useful gpgpwd password manager, you don't need to cram all of those login credentials into your gray cells or jot credentials down on scraps of paper that you keep under your keyboard. Do remember, however, that your password list is lost in case of hard disk failure or theft. Although encryption means that an identity thief will be unable to access your stored passwords, it also means that you will be locked out of your accounts for a while.

To prevent this from happening, you should regularly create a backup of the password file and the GnuPG key (in the ~/.gnupg directory). In important cases, you might also want to make a note of your passwords on a piece of paper, which you keep in a bank deposit box. Additionally, gpgpwd only runs on Linux; your only option for synchronizing the password list with other computers involves a complicated detour via Git repositories (see the "Git" box for details).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News