Language Selection

English French German Italian Portuguese Spanish

How to create a command-line password locker

Filed under
HowTos

Like many people, I have too many passwords to remember. To keep them straight, I wrote a simple password locker script using dialog and GnuPG (GNU Privacy Guard). The script prompts the user for a master password using a dialog box, unencrypts a file that holds a list of passwords, and opens the file in a text editor. When the editor is closed, the script re-encrypts the password file.

Dialog is an ncurses-based utility for providing text-based message and input boxes. GnuPG is a free implementation of the OpenPGP standard. Both applications are available as binary packages on Debian-based systems.

First, I had to create an encryption key using the command gpg --gen-key. I was prompted for the type of key I wanted to generate. Some keys were labeled "sign only," but I needed to use my key to encrypt data, so I selected "DSA and Elgamal" (which wasn't marked sign only). The only other important thing about the questions that followed was that I needed to remember what I typed when prompted for the "Real Name," because it is used when you encrypt.

Once I successfully generated my key, I needed to create a password file and encrypt it.

Full Story.

More in Tux Machines

Samsung Galaxy Tab S Pro Might Be Soon Upon Us

Samsung has been pretty silent when it comes to tablets in the last few months. The Korean tech giant rolled out the Galaxy Tab Active at IFA 2014, but that was just a rugged, re-branded version of the Galaxy Tab 4 8.0-inch model. Read more

How to Get Over Your Fear of Failing at Linux

We’ve written plenty of articles about helping you switch over to Linux from your current operating system. However, even with all of those materials at hand, it’s sometimes still difficult to take the leap of faith and actually try it out. So, this article will be all about questions you might have about switching, and what you can do to ease yourself into the world of Linux. If you read it from start to finish, you’ll have plenty of answers and tips to succeed at Linux. Read more

Don't Fear the Penguin

It was a slow news day today for Linux but a few tidbits stood out. First up is Danny Stieben with his article persuading prospects how easy Linux really is. Read more

Alpine Linux 3.1.2 released

The Alpine Linux project is pleased to announce the immediate availability of version 3.1.2 of its Alpine Linux operating system. This is a bugfix release of the v3.1 musl based branch. This release is based on the 3.14.30 kernel which has some critical security fixes. Read more