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

Canonical Improves Classic Confinement and Aliases Support in Snapd 2.21 Daemon

Canonical's Snappy team is back from the extended Christmas and New Year's holidays, and they've recently announced the release of the Snapd 2.21 Snappy daemon through Michael Vogt, Synaptic and APT developer. Read more

Dell Announces New Ubuntu-Powered Dell Precision Mobile Workstation Line-Up

Following the introduction of the 6th generation Dell XPS 13 Developer Edition mobile workstation back in October 2016, Dell's Barton George is proud to announce the next generation of company's Dell Precision line. Read more

Distributions and Kernels

  • What is your favorite Linux distribution?
    Of all the many questions you might ask an open source enthusiast, none may evoke quite the passionate response as asking which distribution they prefer. People choose a distribution for many reasons, from look and feel to stability, from speed to how it runs on older machines, from the pace of updates to simply which offers the packages they need. Whatever the reason, with so many distributions available, asking which one you use can be seen as a proxy for asking how you choose to interact with your computer.
  • The joy of Just Works
  • Amdocs, Linux Foundation to accelerate service provider, developer adoption of open source ECOMP
    Amdocs and the Linux Foundation have struck up a partnership in an effort to accelerate adoption of the open source Enhanced Control, Orchestration, Management and Policy (ECOMP) platform developed by AT&T.
  • The Age of the Unikernel: 10 Projects to Know
    When it comes to operating systems, container technologies, and unikernels, the trend toward tiny continues. What is a unikernel? It is essentially a pared-down operating system (the unikernel) that can pair with an application into a unikernel application, typically running within a virtual machine. They are sometimes called library operating systems because they include libraries that enable applications to use hardware and network protocols in combination with a set of policies for access control and isolation of the network layer. Containers often come to mind when discussion turns to cloud computing and Linux, but unikernels are doing transformative things, too. Neither containers nor unikernels are brand new. There were unikernel-like systems in the 1990s such as Exokernel, but today popular unikernels include MirageOS and OSv. Unikernel applications can be used independently and deployed across heterogeneous environments. They can facilitate specialized and isolated services and have become widely used for developing applications within a microservices architecture. [...] In this series of articles, we are looking at the projects mentioned in the guide, by category, providing extra insights on how the overall category is evolving. Below, you’ll find a list of several important unikernels and the impact that they are having, along with links to their GitHub repositories, all gathered from the Guide to the Open Cloud:
  • Mesa 17.0 Delayed To Allow For Ivy Bridge OpenGL 4.0
    Mesa 17.0 (formerly known as Mesa 13.1) was supposed to enter its feature freeze last weekend, but that milestone and branching of the code-base didn't happen due to last minute feature work.

Software and today's howtos