Use a password manager! From the command line!

>

Are you using the same password for every single shady cringe image board you come across? Are you afraid of evil hackers being able to steal your prescious steam games or, even worse you fake monero internet money?

Well cry no longer my friend, because there exists a simple solution for this problem! That is using a non-cloud, free software password manager.

On this page I will explain how to use kpcli, a simple command-line based password manager.

Why command line? GUI apps are easier to use, right?

Wrong! Unless you're on windows or something there is literally no reason to use a GUI passowrd manager since CLI ones are infinitely easier to use. Here I will demonstate how that is possible.

If you are using windows however, I'm afraid your command-line experience is dramatically worse then on any other oprating system because windows is defficient,always was and always will be, and therefore you will have to use a GUI one. Mental Outlaw did a good guide on setting one up, so you can check that out. The ultimate solution though is just switching your oprating system to GNU+Linux. By not using it you're doing yourself a disservice.

Installation

Debian/Ubuntu GNU+Linux

sudo apt install kpcli

Arch GNU+Linux

You can get kpcli from the AUR.

Gentoo GNU+Linux

sudo emerge kpcli

Creating a database

You will now create a database. A database is basically used to store all of your randomly generated passwords under one master password.

Enter the command-line and type: kpcli. You should now enter a kpcli shell. from this shell you will be able to create, modify, rename, and otherwise interract with your database.

To create a database, type saveas filename.kdb, and replace filename with whatever you want your database to be called.

kpcli will now prompt you to create a master password. Use a very strong password for this one! This is the key to all of your other passwords that you will be using. If someone knows this password they have access to all of your other passwords, so don't set '1234' unless it's a test.

🎉Success! 🎉

If everything went smoothly you should now have a functional database.

Accessing the database

A .kdb file should now be created in the last directory you've been to. This file is encrypted and to open it you have to have a kdb-compatible program and your password. You will need this file to access your passwords!

You can access this file either from the kpcli shell or, as I preffer to do it, outside of the shell you can do kpcli --kdb filename.kdb. After giving your password you will enter the kpcli shell. Here you can do ls to see all of the availiable groups that there are.

Useful kpcli commands

help: listing ALL availiable commands
ls: listing entries in current group
cd: moving between groups
mkdir groupname: create a group
rmdir groupname: remove a group
new entryname: create a new entry
show -f entryname: show details about the entry and the password
saveas filename.kdb: create a new .kdb database

Creating an entry and generating a password

You can cd into a group of your choosing and start creating a new entry. To create one use the new command.

Kpcli will now prompt you to fill in the following:

Title: This is what will be display when you do ls.
Username: This is optional; if you have more usernames on some service you can fill this to be sure.
Password: To auto-generate press g and enter. That will ensure the most security.
URL: This is optional; serves as a reminder to which potential website a password belongs.
Notes/Comments: any additional notes you want to add in. When you're finished (or you want to skip), enter . on a new line.

After finishing, you can show the contents of the entry with show titleofentry, this will show everything with the password blurred out. To show the password also use show -f titleofentry.

That's basically all there is too it.

Easy enough, right? Your mom could probably use this. And yes, I mean the cli version.

Additional notes

I recommend you doing backups of your kdb file, because once you lose access to this file, you lose access to all of your passwords!.

Phone note: you can use your phone to open your .kdb database too if you trust google not to monitor your keystrokes and then selling your master password. I recommend KeePassDX for android, but there are numerous other ones. Just make sure not to use a proprietary password manager ffs.


If you have any further comments, questions or suggestions, send them at jakub@bidzan.net.


Copyright © 2022 Jakub Bidžan
License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html.
Source code: https://git.drgnz.club/jacob/main