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

Games Leftovers

OSS Leftovers

  • Julita Inca Chiroque: Parallel Computing Talk
  • Open Source Monitoring Conference: Speakers, Agendas, and Other Details
    One of today’s leading tech conferences, the Open Source Monitoring Conference (OSMC), is back to bring together some of the brightest monitoring experts from different parts of the world. The four-day event will be held at Holiday Inn Nuremberg City Conference in Germany starting today, November 21st, until November 24th.
  • Why a Dallas-area tech startup opened a KC office
  • Open education: How students save money by creating open textbooks
    Most people consider a college education the key to future success, but for many students, the cost is insurmountable. The growing open educational resource (OER) movement is attempting to address this problem by providing a high-quality, low-cost alternative to traditional textbooks, while at the same time empowering students and educators in innovative ways. One of the leaders in this movement is Robin DeRosa, a professor at Plymouth State University in New Hampshire. I have been enthusiastically following her posts on Twitter and invited her to share her passion for open education with our readers. I am delighted to share our discussion with you.

Android Leftovers

Linux 4.10 To Linux 4.15 Kernel Benchmarks

The ThinkPad X1 Carbon has been enjoying its time on Linux 4.15. In addition to the recent boot time tests and kernel power comparison, here are some raw performance benchmarks looking at the speed from Linux 4.10 through Linux 4.15 Git. With this Broadwell-era Core i7 5600U laptop with 8GB RAM, HD Graphics, and 128GB SATA 3.0 SSD with Ubuntu 17.10 x86_64, the Linux 4.10 through 4.15 Git mainline kernels were benchmarked. Each one was tested "out of the box" and the kernel builds were obtained from the Ubuntu Mainline Kernel archive. Read more