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

Make Your Mark on the World With Linux

Linux and FOSS have already changed the world, and we're just at the beginning. This is a great time to learn to be a maker, in contrast to being a mere consumer. Clicking buttons on a smartphone is not being tech-savvy; hacking and building the phone is. Some people give Make Magazine the credit for launching the Maker Movement. Whether they launched it or just gave it a name, it is a real phenomenon, a natural evolution of do-it-yourselfers, inventors, and hackers in every generation. Remember Popular Mechanics, Popular Science, Hands-On (for Shopsmith projects), photography magazines, woodworking magazines, electronics...remember Heathkit? Remember when Radio Shack was still an electronics store? How about Edmund Scientific? That is still a wonderful playground of anatomical models, microscopes, telescopes, dinosaurs, prisms, lenses, chemistry sets, lasers, geology stuff, and tons more. All of these still exist, and have moved online like everything else. It's a feast of riches, plus we have all the cool new stuff that Make Magazine covers. This is absolutely the best time to be a curious tech adventurer. Read more

XnConvert Review – An Image Batch Processor like No Other

XnConvert is batch image processor that has been designed to work on multiple operating systems. It comes with a Linux client and it's one of the few tools of its kind on this platform. Let us now take a closer look at the application to see why it's incredibly useful. Read more

Season of KDE

This is my first SoK and hence I am equally excited and motivated to make a niche for myself with my work. The task allotted to me was to finish test.kubuntu.co.uk . My task was to use a WordPress theme and finish the site but I am not a big fan of WordPress themes. So I decided to make my own theme and thankfully my mentor , Jonathan Riddell was on the same page with me. Thus began the first lap , thinking and coming up with a new design. Read more

Linux Mint 17.1 "Rebecca" MATE Stable Is Ready for Download – Screenshot Tour

The Linux Mint 17.1 "Rebecca" MATE distribution has been made available and the ISO images can be downloaded from the officials servers. Just like the Cinnamon flavor, the MATE edition is quite heavy on the new features. Read more