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

Can Jolla Deliver the First Open Source Tablet?

Some dreams die hard. After the KDE-based Vivaldi tablet failed to appear after three years of anticipation, Jolla is planning a free software tablet of its own. The product is off to a roaring start, having just raised $1,824,055 in its crowdfunding campaign-- almost five times the original target. So, this time, we might actually see some hardware. Mind you, whether the tablet will satisfy everyone remains open to doubt. Although Jolla is talking loudly about being "people powered" and listening to want users want, some requests, especially for hardware, may be impossible to fulfill. The manufacturing capacity of advanced features is limited world-wide, and monopolized by large companies like Apple and Samsung. More importantly, exactly how free the tablet will be has yet to be announced. Read more

First Ubuntu Phone Will Launch In Europe This February

The first Ubuntu Phone will go on sale in Europe in the second week of February. Read more

Sandia looks to open-source robot tech

Researchers at federal defense and energy laboratories are open sourcing some of the electronics and software for two advanced ambulatory robots in hopes of boosting their ability to handle perilous situations. In a Dec. 16 announcement, the Energy Department's Sandia National Laboratories said it is developing more energy-efficient motors to dramatically improve the endurance of legged robots performing the types of motions that are crucial in disaster response situations. The project is supported by the Defense Advanced Research Projects Agency. Read more

Google releases open-source Java SDK for Cloud Dataflow service to form data pipelines

It’s been a long, long time since Google came up with the foundational technologies for storing and processing big data. This year, the company developed a new tool for working with data as it comes in, and now Google is keen to see people use it. Read more