One thing that's probably obvious to anyone who's read more than a few Linux Rain articles is that we appreciate the CLI (command-line interface). Graphical programs and utilities are great and there are some fantastic examples of those out there, not to mention new ones being created all the time. But the CLI will always have a place for those who feel comfortable using it and appreciate the power and lightweight nature of the interface. So if you're looking for a password manager for the command-line, Steel is one such example we're taking a look at today.
According to the Steel website, the program "uses RIJNDAEL encryption in CFB mode with 256 bit keys. Steel is simple, Steel is advanced, Steel is adaptable. Steel is the new prophet of password management." I'll let you, the reader, decide whether the last part of that line is true! But nevertheless, in one line you get the idea that Steel is meant to be simple yet powerful, in true Unix fashion.
Other features include:
- Written fully in C
- Integrates with standard Unix tools
- Uses SQLite as database backend
- Generates secure passwords
- Backup and restore
And more. The Steel homepage lists some of the more technical aspects for those interested.
You'll want to head to the Download page for Steel. Fair warning: there is a quick bit of compiling to do here. That's not a problem though, as Steel, like the aforementioned Memo, is a simple C program and requires just a few dependencies. They being SQLite, Mhash and Libmcrypt. I recommend consulting the Steel download page for the latest information on this in case it changes, but if for example you wanted to install those dependencies in Ubuntu or Linux Mint, something like
sudo apt-get install libmhash-dev libmcrypt-dev libsqlite3-dev
ought to do the trick.
Then you want the Steel archive itself. It's recommended to download the stable version of Steel, which you will find on the Download page also, as well as the latest code from Gitlab if you desire it.
Extract the downloaded archive, move to the newly created source directory and run the usual basic "make" command. It should go without saying you will need to have source code "build" tools such as GCC and GNU Make installed to accomplish this.
cd ~/Downloads tar -xvf <steel archive name>.tar.gz cd <extracted steel directory> make sudo make install
I recommend keeping the source directory where it is in case you wish to run
sudo make uninstall at a later date to uninstall the program.
So long as you're comfortable with the command line, using Steel is pretty easy.
Database File Creation
To start using it, first you need to create (initialize) a database file, which will contain your passwords that you create in Steel.
steel -i myDB
This will create the file myDB in your current working directory. You can create as many database files as you want using the above command.
Encrypting/Closing the File
Next you'll want to apply some security to the file using Steel's close command, which will apply the encryption.
The program will then prompt you for a passphrase. Obviously use whatever you like, but like any passwords/passphrases, try to use something secure!
Opening an Encrypted/Closed File
Then, to actually start adding passwords you'll need to tell Steel to open your database file again. This also applies to opening any "closed" database file you may have created in Steel.
steel -o myDB
Steel will prompt you for the passphrase you created for that file. Enter it correctly, Steel will now have your database file open and ready for some passwords to be added!
There's two ways to create a new password entry in Steel. One simply uses the syntax of:
steel -a <title> <user> <url> <notes>
However, there is also an interactive mode:
steel -a -I
Steel will then prompt you for the title, the username and the URL (etc) interactively, which you may find more to your liking.
To list all entries in your database:
And to list a specific entry by ID:
steel -s <id number>
As you can see, simply listing an entry won't automatically display the actual password (or passphrase as it is called in Steel) for that entry, most likely for security reasons. To display the password as well, use the '-l' switch combined with the '-p' switch like so:
steel -l -p <id number>
Deleting an Entry
Similar to listing, only replacing the '-s' with '-d':
steel -d <id number>
And so on and so forth.
Steel uses a sane and easily memorable syntax and there are extra commands you can play with (including using Steel to generate a password for you). I strongly recommend consulting the "man" page for Steel, where there are a full list of commands provided complete with examples.
Most importantly, once you are done adding and/or listing your saved passwords, remember to close the database file! eg.
Steel does exactly "what it says on the tin" and does so in the style of a true Unix utility, being completely CLI oriented and making use of plain text for input/output as well as easy to use commands. Of course, thankfully, the actual sensitive data is encrypted and not stored in plain text.
Typically, I don't make use of 'password managers', though perhaps I should given the sheer amount of times I've forgotten a password! That may well change with Steel though, as it is extremely lightweight and unobtrusive and very easy to backup and restore, not to mention being portable, given it's flat-file nature.
That sort of thing certainly appeals to me, and if it does with you too, do give it a try!