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

11 Best Linux Gaming Distros You Need To Use In 2018 and Fortnite Coming to Android

  • 11 Best Linux Gaming Distros You Need To Use In 2018
    Gaming on Linux scene is improving each year with better hardware support and increasing support from game developers. Apart from established distros like Ubuntu and Arch Linux, gamers are using Linux gaming distros like Steam OS to get a better experience. The other popular gaming operating systems are Sparky Linux – Gameover edition, Ubuntu GamePack, Lakka Linux, etc. Apart from many general-purpose Linux distributions, there exists a crop of distros for specific purposes. Gaming Linux distros too belong to one such category. These distros are specifically built to address your gaming needs, thanks to better hardware support and tons of preinstalled tools.
  • Fortnite: After Nitendo Switch, Android Is The Next Stop
    While the E3 concluded with lots of surprises and striking gaming news, Nitendo came up with its own pandora box. In its E3 presentation, Nitendo released Fortnite version for Switch which can be downloaded through Nitendo eShop. It is now absolutely clear that next stop of Epic Games Fortnite would be Android Devices. According to the Fortnite blog, developers are very rigid on summer release of its Android version. In the month of March, Fortnite revealed its iOS version adding to the list of platforms including Xbox One, PS4, PC, iOS and now Nitendo Switch.

Fedora and Red Hat Leftovers

today's howtos

Kubuntu 18.04 Bionic Beaver upgrades - Results!

A month later, two upgrades later, Kubuntu 18.04 Bionic Beaver is a nicer distribution than what I tested shortly after its official release. But then, it's not perfect. The older box with the Nvidia card returned better results overall, although there were some niggles. On the multi-boot laptop, I wasn't too happy with the slow-boot issue, although this is NOT a Kubuntu-specific problem, as you will learn in a few days. But it still does not give me the razor-sharp confidence I need and expect from an LTS. In general, Ubuntu-family upgrades are reasonably robust, but they can still be more streamlined, including package removal, third-party repos and odd glitches here and there. I wonder how I'd have felt if I tested Beaver fresh, right now. Alas, I cannot delete the memory of my first encounter. With Trusty, it was just right. Here, it might be right, and I may even end up using - and loving - Plasma Bionic in my prod setup, but it will never be the amazing chemistry I had with 14.04. But if you're wondering, by all means, worth testing and upgrading, and the post-release Kubuntu Beaver is a pretty slick and tight distro. If I had to judge in isolation, i.e. no early-May scars, then when I combine performance, looks, fonts, media, hardware support, and such, 'tis really neat. Something like 9/10. Now, just waiting for the Men In Black mind-zapping eraser thingie, so I can be blissfully happy. And we're done. Read more