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

Intel Beignet Is Working Out Surprisingly Well For OpenCL On Linux

Beignet is the project out of Intel's Open-Source Technology Center for exposing GPGPU/compute capabilities out of Ivy Bridge hardware and newer when using a fully open-source Linux stack. While Beignet differs greatly from Gallium3D's Clover state tracker, this Intel-specific open-source OpenCL implementation is working out quite well for Ubuntu Linux. While I've been writing about Intel's Beignet project since early 2013, it's probably been about a year now since I tried out the code, which is developed by Intel's OTC graphics team in China. This weekend I tried out Beignet v0.9.2 as trying out the newest Intel OpenCL code has been on my TODO list for a while and it's been working out rather well in my initial tests. Read more

Chromebook to come with Intel Broadwell chips

Intel is expected to launch its 5th-gen Intel Core CPUs based on Broadwell architecture by the end of this year. According to the latest leaked information, Google’s Chromebook might feature this Broadwell chip. Intel is focusing on bringing high performance CPU which has minimum power requirement with Broadwell chip. Even though Broadwell is the scaled down version of Haswell, it will still maintain the same CPU performance as Haswell. The company is working on better performance-per-watt and lower power consumption to improve battery life of devices. Broadwell is just 14 nanometer in size. Read more

Deepin 2014.1 Released With Bug Fixes And Minor Enhancements

Deepin 2014.1 was released today with numerous bug fixes meant to improve the system stability and performance as well as a few interesting enhancements / new features. Users who have already installed Deepin 2014 don't have to reinstall - a simple upgrade via the Deepin Store or command line (sudo apt-get dist-upgrade) is enough to get the latest Deepin 2014.1. Read more

Quod Libet 3.2.1 Review – An Almost Perfect Music Player

It's a mystery why Quod Libet is not a more popular media player. It's been around for years and the developers have constantly worked on it. The last major update was done back in May 2014, and the software is stable and full of goodies. Quodlibet is a Latin phrase that means "what pleases" and it's used in music to describe a piece that's a combination of multiple melodies. The name seems to relate very well to the media player and it's actually quite catchy. Read more