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

‘Governments should have a free software policy’

Governments must have policies that increase their use of free and open source software solutions, says Professor Dr Wolfgang Finke from the Ernst-Abbe University of Applied Sciences in Jena (Germany). In many countries, the use of proprietary software might be unsustainable in the long-term, he says, “either from a technical or from a financial point of view.” Read more

Linux Remote Desktop Roundup

Over the years I've found that a significant hurdle to getting family and friends to switch to Linux comes from its lack of familiarity. This is especially true when it comes to troubleshooting any issues. Obviously, when a malfunction occurs it's not always possible to be there in person. However thanks to the wonders of broadband Internet and advanced software, we're now able to do the next best thing. In this article, I'll share some recommended remote desktop software for Linux. I’ll explore both open source and closed source solutions. Read more

Android ski goggles offer augmented reality display

It runs Android on a 1.2GHz ARM CPU, and offers hands-free control. Read more

Photoshop competitor Krita is a true creative tool -- and it's free and open source

Open source has some of the greatest tools, which continues to prove that you don't have to lock-down the code behind guarded walls to make a better product. Some popular open source products that don't have any match in the closed source world include Firefox, Chromium, VLC, Blender, Android, one gem that is, surprisingly, less known but extremely powerful when it comes to creating a work of art. Read more