Generate word-based passwords. Based on [XKCD/936](https://xkcd.com/936/), word-based passwords are easier to remember than a string of random letters/numbers/punctuation.
Password generators can be found all over the internet, but most generate random combinations of letters + numbers + punctuation. If a combination of those is long enough to be secure, it is also long enough to be difficult to remember, and possible difficult to type.
The XKCD comic #936 introduced the idea that a phrase of 3, 4 or 5 common words can be used as a password that is sufficiently difficult to crack in our lifetimes. The program **`pwgen`** is a locally hosted generator of these kinds of pass phrases.
This program runs locally on a UNIX/Linux based computer, and the passphrase never crosses the network, so you can be sure that you're the only one who has ever seen it.
By default, **`pwgen`** will build a pass phrase using words from the dictionary at **`/usr/share/dict/words`** and add punctuation to separate the words.
The **`-s`** and **`-S`** options add padding using spaces or periods/commas, making thease passphrases easy to type on a smartphone. Adding the **`-p`** option will padd the phrase using a "special characters"; the character will be one of ` !@#$%^&*()-_=+[{]}\\|;:/?.>,<~`. Similarly, the **`-P`** option uses a number.
The **`-L`** option allows you to specify a minimum length for the pass phrase, although the result may be a few characters longer than you requested, so that the words aren't chopped up.
The **`-a`** option uses common English conjunctions to separate a pair of words. If the 2nd word starts with a vowel, the conjuntion "a" is changed to "an". I find these phrases much easier to remember than just a sequence of words.
Part of the reason for using pass phrases is to make them easier to remember for us humans. Sometimes, the first phrases offered just doesn't seem memorable, so you can add a small integer after `pwgen` to get multiple offerings, and you can just choose the one that seems memorable to you.
The **`-k`** and **`-K`** options will create CamelCase and snake_case respetively. You can use the **`-M`** option to capitalize all the dictionary words.
Some servers require numbers and "special characters" in the passwords, so the **`-n, -N, -c`** and **`-C`** allow you to add these characters at the beginning or the end of your passphrase. See the examples below.
The **`-X`** option is included to abbreviate a commonly used combination of **`-MNCS`**.