geekabit

lightbulb

Password manager

project , author Maarten Tromp, published , 210 words.

When looking for a simple password manager that would work over ssh, I could find none. Everything seemed to be graphical, web based or complex. So I did what any hacker would do, I made one myself.

pw code screenshot
pw code screenshot

In this article:

Implementation

My password manager is a simple GPG wrapper script. All passwords and login details are in a single encrypted text file. The script decrypts it for you, starts a viewer or editor and re-encrypts afterwards when needed. It takes care of temporary files, backup and shredding of plain-texts.

Usage

Start pw.
When asked, type your gpg password.
Pw now opens the decrypted password file in less.
To open password file in editor type v.
Make changes to the file.
Quit editor.
To quit less type q.
Pw will now save the changes and shred the tempfile.

Open source

The password manager in this article is developed using free and open source software where possible. Code is written using Vim, runs in Bash, and encryption is done using GnuPG.

In turn, this code and article are released into the public domain. You can find relevant files in the downloads directory of this article.

Afterword

This script fitted the need I had for a simple tool and has done exactly that for the better part of a decade now.