Linux tools to generate password

Few days ago was looking for simple tool to generate passwords in linux console.
As result of my searching are 3 useful tools. They are:

  • apg

  • makepasswd

  • pwgen


apg


Install: sudo apt-get install apg

Asks to enter random data, that should be used to generate new password.
Example:

Please enter some random data (only first 16 are significant)
(eg. your old password):>
Opt8Ovuf (Opt-EIGHT-Ov-uf)
Uc1Gryec (Uc-ONE-Gryec)
jadJoav5 (jad-Joav-FIVE)
IshtIvawam3 (Isht-Iv-aw-am-THREE)
lakVosAfUrg7 (lak-Vos-Af-Urg-SEVEN)
dyijDus8 (dyij-Dus-EIGHT)

You can pass random string as parameter and use many different options:

$ apg -n 10 -m 8 -x 12 somerandomdata

Will generate 10 passwords with min length 8 and max length 12.

makepasswd


Install: sudo apt-get install makepasswd

Generates password, by default one. User may need to use options to set length of password and count of passwords. For example:

$ makepasswd --count=10 --minchars=5 --maxchars=10

Results:

mzd4f9q
gUWamL
NYiUXrYvq3
6hWDXKA
gQpu20IJGD
BSAT5ASFX
37FcKyLPb
ma7pC66A
cFpWPBy
0oTNhT7


pwgen


Install: sudo apt-get install pwgen

My favorite tool to generate password. By default generates 160 different passwords each with length 8 symbol. Programs takes 2 parameters:
- 1st is the length of the password and
- 2nd is the count of passwords to generates. For example:

$ pwgen 12 24

Results:

oHo2iethieze cheiS6ohPeed Oozufiorohv9 eic3aethei4L hiRohYie6Ue4 aephoiDieb0y
hieTh8eizaeK aid1EeNgaiSe yoh6chohX9ha aiPhae7dieMe wedooD8nai7y aic7deeB9eS8
ohFor3Achied Thaequu4aiph zaeghiem7keT Shee5ooxaex0 wePh2eiNgien aicohroo2Go3
Aagh0gahcah0 Zie8eazaitah aoha9AeXi7Bo Oojoob0oosh6 Olahgh4aeji6 oobae9UZ2phi

2 comments:

Ruslan Khmelyuk said...

Just another way to generate password:
$ openssl rand -base64 12
or
$ openssl passwd
and enter a set of characters twice.

Ruslan Khmelyuk said...

Yet another way to generate random password using /dev/urandom from http://www.shell-fu.org/lister.php?id=885

egrep -ioam1 '[a-z0-9]{8}' /dev/urandom