The Linux Rain Linux General/Gaming News, Reviews and Tutorials

Steel, Password Managing the CLI Way

By Andrew Powell, published 10/01/2016 in Overviews


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.

Steel was created by Niko Rosvall. If that name sounds familiar, you may remember we covered another of Niko's projects, Memo.

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.

Getting Steel

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.

Example:
cd ~/Downloads
tar -xvf .tar.gz
cd
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.

Usage

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.

steel -c

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!

Adding Entries

There's two ways to create a new password entry in Steel. One simply uses the syntax of:
steel -a <user> <url> <notes></p> <p>However, there is also an interactive mode:</p> <pre><code>steel -a -I</code></pre> <p>Steel will then prompt you for the title, the username and the URL (etc) interactively, which you may find more to your liking.</p> <h3>Listing Entries</h3> <p>To list all entries in your database:</p> <pre><code>steel -l</code></pre> <p>And to list a specific entry by ID:</p> <pre><code>steel -s <id number></code></pre> <figure><img src="https://www.thelinuxrain.org/content/01-articles/111-steel-password-managing-the-cli-way/steel1.png" alt=""></figure> <p>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:</p> <pre><code>steel -l -p <id number></code></pre> <h3>Deleting an Entry</h3> <p>Similar to listing, only replacing the '-s' with '-d':</p> <pre><code>steel -d <id number></code></pre> <p>And so on and so forth.</p> <hr /> <p>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.</p> <pre><code>man steel</code></pre> <p>Most importantly, once you are done adding and/or listing your saved passwords, remember to close the database file! eg. <code>steel -c</code></p> <h2>Closing thoughts</h2> <p>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.</p> <p>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. </p> <p>That sort of thing certainly appeals to me, and if it does with you too, do give it a try!</p> <hr> <div class="share-links"> <h4>Share This</h4> <a class="twitter" href="https://twitter.com/share?url=https%3A%2F%2Fwww.thelinuxrain.org%2Farticles%2Fsteel-password-managing-the-cli-way&text=Steel%2C+Password+Managing+the+CLI+Way" class="button">Twitter</a> <a class="facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.thelinuxrain.org%2Farticles%2Fsteel-password-managing-the-cli-way">Facebook</a> </div> <div class="about-author"><hr /> <h4>About the author</h4> <p>Andrew Powell is the editor and owner of The Linux Rain who loves all things Linux, gaming and everything in between.</p></div> <span class="tags">Tags: <a href="/tag:steel">steel</a> <a href="/tag:password-manager">password-manager</a> <a href="/tag:cli">cli</a> <a href="/tag:command-line">command-line</a> <a href="/tag:overviews">overviews</a> </span> </div> <!-- /.article-inner-content --> <div id="disqus_container"> <div id="disqus_thread"></div> <script type="text/javascript"> var disqus_shortname = 'thelinuxrain'; // required: replace example with your forum shortname var disqus_title = 'Steel, Password Managing the CLI Way'; var disqus_developer = 'false'; // developer mode var disqus_identifier = 'articles/steel-password-managing-the-cli-way'; var disqus_url = 'https://www.thelinuxrain.org/articles/steel-password-managing-the-cli-way'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a> </div> </article> </div> <!-- /.article-content --> <aside class="right-sidebar"> <section> <form action="https://www.thelinuxrain.org/search"> <div class="input-group"> <input class="form-control search-field" type="text" name="q" placeholder="Search..." /> <span class="input-group-btn"> <input class="btn search-submit" type="submit" value="" /> </span> </div> </form> </section> <section> <h4>Follow Us</h4> <div class="social-follow-buttons"> <a href="https://facebook.com/thelinuxrain" target="_blank"><span class="social-button btn-facebook"></span></a> <a href="https://twitter.com/intent/user?screen_name=TheLinuxRain" target="_blank"><span class="social-button btn-twitter"></span></a> <a href="feed" target="_blank"><span class="social-button btn-rss"></span></a> </div> </section> <section> <h4>Recent Articles</h4> <div class="widget_recent_entries"> <ul class="sidebar-links"> <li> <a href="https://www.thelinuxrain.org/articles/mkws-static-site-generation-with-the-shell">mkws - Static Site Generation With The Shell</a> </li> <li> <a href="https://www.thelinuxrain.org/articles/geolocation-using-python">Geolocation using Python</a> </li> <li> <a href="https://www.thelinuxrain.org/articles/python-for-data-science-data-visualization">Python for Data Science: Data Visualization</a> </li> <li> <a href="https://www.thelinuxrain.org/articles/tor-browser-anonymity-and-beyond">Tor Browser: Anonymity and Beyond</a> </li> <li> <a href="https://www.thelinuxrain.org/articles/thelinuxrain-now-brave-verified">The Linux Rain is Now Brave Verified ✔</a> </li> <li> <a href="https://www.thelinuxrain.org/articles/security-auditing-tools-for-ubuntu">Security Auditing Tools For Ubuntu</a> </li> <li> <a href="https://www.thelinuxrain.org/articles/hacking-wpa2-wifi-networks">Hacking WPA2 WiFi Networks</a> </li> <li> <a href="https://www.thelinuxrain.org/articles/sending-email-using-python">Sending an Email Using Python</a> </li> <li> <a href="https://www.thelinuxrain.org/articles/how-to-set-systemd-to-hibernate-instead-of-suspend-on-laptop-lid-close">How to Set systemd to Hibernate Instead of Suspend on Laptop Lid Close</a> </li> <li> <a href="https://www.thelinuxrain.org/articles/ssh-tunneling">SSH Tunneling</a> </li> </ul> </div> </section> <section> <h4>Editor Picks</h4> <div class="widget_recent_entries"> <ul class="sidebar-links"> <li> <a href="https://www.thelinuxrain.org/articles/sending-email-using-python">Sending an Email Using Python</a></li> <li> <a href="https://www.thelinuxrain.org/articles/mount-dvd-to-fix-playback-issues">Quick Tip: Mount DVD to Fix Playback Issues</a></li> </ul> </div> </section> <section> <h4>Linux Links</h4> <div class="widget_recent_entries"> <ul class="sidebar-links"> <li> <a href="https://www.datafix.com.au/BASHing/">Bob Mesibov's BASHing Blog</a></li> <li> <a href="https://www.sudosatirical.com/">Sudo Satirical</a></li> <li> <a href="http://www.tuxarena.com/">TuxArena</a></li> </ul> </div> </section> <section> <a href="https://www.resetthenet.org" target="_blank"><img class="img-responsive" src="https://www.thelinuxrain.org/assets/images/take-back-reset-the-net.png"></a> </section> </aside> </div> <!-- /.main --> </div> <!-- /.container-fluid --> <footer> <div class="text-center"><p>© 2013-2021 The Linux Rain<br /> Powered by the <a href="http://getkirby.com">KirbyCMS</a><br /> Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.</p></div> </footer> <script src="https://www.thelinuxrain.org/js/jquery.min.js"></script> <script src="https://www.thelinuxrain.org/js/bootstrap.min.js"></script> <script> jQuery(document).ready(function($) { $('.dropdown-eligible').children('a').append(' <span class="caret"></span>'); $('.dropdown-eligible').children('a').addClass('dropdown'); $('.dropdown-eligible').children('a').attr('data-toggle', 'dropdown'); $('.nav .sub-menu').addClass('dropdown-menu'); }); </script> </body> </html>