Using Pwgen to create secure passwords
2009 November 24
It’s nice to have a fast utility to make secure passwords for you, if you don’t then you become lazy and create passwords like “dog123″ or “qwert123″.
The pwgen command prints out a table of passwords which you can then copy a password from. For security reasons it prints out multiple passwords just in case someone gets ahold of your log files.

pwgen has several options too such as:
- numbers – by default numbers are included but you can exclude them as well
- capitalization – you can enable/disable capitalization
- ambiguous – you can avoid ambiguous characters such as O and 0(zero and ooo)
- secure – generate completely random hard to memorize passwords
- symbols – include at least one special character in the password or exclude symbols
You can install pwgen by running
OS X (if you have ports installed)
sudo port install pwgen
Ubuntu
sudo apt-get install pwgen
Once you have it installed then tie it to an alias command such as ‘pass’. For more about aliases check out my post on aliases.
Then check out the man page or you can view the man page online.
No comments yet
