To top of

Generate passwords

Principles of cryptography

There are of course many tools in *n?x for generating passwords. pwgen is my most favorite tool. pwgen offers a wide choice of options. Here is a sample of what pwgen can do for you.
But, you may like to try making a home-grown tool of your own. Use these simple one-line shell scripts, to generate your own passwords of any length:
  1. Method #1 :
    uptime | sha256sum | head -c 32 ; echo
    Make passwords 32 characters long.
  2. Method #2 :
    uptime | md5sum | head -c 8 ; echo
    Make passwords 8 characters long.
You can build more elaborate shell scripts, using the above one-line scripts. These scripts can also be useful whenever you want to generate random text strings e.g. for OTP, for CAPTCHA challenges, for misc. testing.

Here are two simple examples (you can improve upon them or customise them, any way you want):

You may like to test the "strength" of your password, before using it for any serious purpose. Try this password strength meter. The javascript code used is also available (with permission of the original author) for download and inspection.

Last updated : 2017-01-18
Comments and feedback :