Language Selection

English French German Italian Portuguese Spanish

How to create a command-line password locker

Filed under

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

Cinnamon 2.8.6 Desktop Environment Is Out for Linux Mint 17.3 "Rosa"

The developers behind the popular Cinnamon open-source desktop environment, a fork of the GNOME Shell user interface of the acclaimed GNOME 3 desktop environment, have released a new maintenance build for the Cinnamon 2.8 series. Read more

KDE Plasma 5.5

  • KDE Plasma 5.5 Windows 8 Metro-Inspired Theme Looks Interesting
    KDE developer Kai Uwe has just published a lengthy article where he talks about developing a Windows 8-inspired theme for the upcoming KDE Plasma 5.5 desktop environment.
  • KDE Developer Working On Windows 8 Inspired Look
    Kai Uwe has been working on some experimental hacks to resemble Windows 8, although Microsoft's default interface has changed with Windows 10. He's calling this work "U-Bahn" (the German equivalent of a Metro subsystem system) in reference to Microsoft at the time calling it Metro. This was just some brief hacking and he's not planning to see this U-Bahn project through to the end.
  • Pursuing Awesomeness
    While applets can be installed through “Get Hot New Stuff” and distribution repositories, there’s also the classic .plasmoid file. A feature suggested by one of my colleagues – fresh KDE Plasma user – was to drag .plasmoid files onto the desktop or panel and have them installed. After Marco Martin implemented the neccessary KPackage plumbing this is now possible.

Security Leftovers

Leftovers: Gaming