Simple Cross Platform Password Generation using pwgen

Written by James McDonald

September 30, 2009

If, like me, you lack a certain amount of inspiration when trying to generate secure passwords pwgen may be the answer for you. It has heaps of options (see below) and can assist you to generate new secure passwords for your users. Thanks to the cygwin project you can use it on Windows aswell.

Installation:
For Ubuntu:

sudo apt-get install pwgen

For Windows:
Download and Install cygwin and select to install pwgen

Usage Example:

you@yourbox:~$ pwgen 9 1
iqueZi4pa
# generates 1 password 9 characters long with the default options

Options:

bash-3.2$ pwgen --help
Usage: pwgen [ OPTIONS ] [ pw_length ] [ num_pw ]

Options supported by pwgen:
  -c or --capitalize
        Include at least one capital letter in the password
  -A or --no-capitalize
        Don't include capital letters in the password
  -n or --numerals
        Include at least one number in the password
  -0 or --no-numerals
        Don't include numbers in the password
  -y or --symbols
        Include at least one special symbol in the password
  -s or --secure
        Generate completely random passwords
  -B or --ambiguous
        Don't include ambiguous characters in the password
  -h or --help
        Print a help message
  -H or --sha1=path/to/file[#seed]
        Use sha1 hash of given file as a (not so) random generator
  -C
        Print the generated passwords in columns
  -1
        Don't print the generated passwords in columns
  -v or --no-vowels
        Do not use any vowels so as to avoid accidental nasty words

2 Comments

Trackbacks/Pingbacks

  1. Creating Passwords that don’t Require a Keyboard Epiphany using pwgen | The Southern IT Observer - […] rediscovered pwgen which I had forgotten all […]

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

How to Research a CPU Upgrade

How to Research a CPU Upgrade

Upgrade Time! Doing a lot of VMWare Workstation virtualization to create labs for self-study and training. Finding...