[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.7 gnu-pw-mgr Examples

Before running the program to print a password, you must first initialize its database with at least one seed.

 
gnu-pw-mgr --tag "first-seed-tag" --text \
"This is only a 'test'.  Were it *real*,
you _would_ likely know?"

These two strings along with a password id are used to create a ‘sha256’ hash code password. So, now you are able to print a password.

 
gnu-pw-mgr --login-id "user-name" --length 32 \\
    --cclass=upper,lower,digit,special \\
    my example.com

In this example, the password id is the string "my example.com". The space character is inserted between the command line operands. The options are associated with this id via another ‘sha256’ sum of just the id. The "user-name" would typically be either your actual user name for the site, or something that could readily remind you of the login id. If omitted, just do not forget it. The length specifies the maximum length allowed for a password on the site. You will get a password of that length. The --cclass defines the allowed and/or required character class(es) for the passwords for the site.

With the above seed and invocation, you will see printed out exactly this:

 
seed-tag     login id hint: user-name   pw:
first-seed-tag iQiF1g5aLQ0JqFIUbR/svpTS+F/PCeoy

Henceforth typing just ‘gnu-pw-mgr my example.com’ will always yield this output. The options above are now associated with the password id via a hash code. The gnu-pw-mgr database (either ‘~/.local/gnupwmgr.cfg’ or ‘~/.gnupwmgrrc’, but the former preferred) will now be this (hash code abbreviated):

 
<seed>
  <tag>first-seed-tag</tag>
  <text>This is only a 'test'.  Were it *real*,
you _would_ likely know?</text>
</seed>
<program per_pw_id>
<pwtag id="*HASH*">
  cclass = =alpha + upper + lower + digit + special
</pwtag>
<pwtag id="*HASH*">length = 32</pwtag>
<pwtag id="*HASH*">login-id = 'user-name'</pwtag>

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Bruce Korb on June 30, 2018 using texi2html 1.82.