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 *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Squarespace Image Export

To gain continued access to your Squarespace website images after cancelling your subscription you have several...

MySQL 8.x GRANT ALL STATEMENT

-- CREATE CREATE USER 'tgnrestoreuser'@'localhost' IDENTIFIED BY 'AppleSauceLoveBird2024'; GRANT ALL PRIVILEGES ON...

Exetel Opt-Out of CGNAT

If your port forwards and inbound and/or outbound site-to-site VPN's have failed when switching to Exetel due to their...