To generate a random password you can use pwgen
:
pwgen generates random, meaningless but pronounceable passwords.
These passwords contain either only lowercase letters, or upper
and lower case mixed, or digits thrown in.
Uppercase letters and digits are placed in a way that eases
remembering their position when memorizing only the word.
Generate 7 passwords of length 13:
geek@liv-inspiron:~$ pwgen 13 7
Eu7Teadiphaec giepahl3Oyaiy iecoo9Aetaib4 phaiChae6Eivi athoo3igee8Co
Iphu4ufeDeelo aesoYi2lie9he
As mentioned in the comments, you can avoid reducing entropy by using the -s
argument (i.e. generate more secure, completely random but hard to remember passwords):
geek@liv-inspiron:~$ pwgen -s 13 7
eAfycrPlM4cYv 4MRXmZmyIVNBp D8y71iqjG7Zq7 FQRHcserl4R8O yRCUtPtV3dsqV
0vJpp2h0OrgF1 QTp7MKtJyTrjz
To generate random user names you can use gpw
:
This package generates pronounceable passwords. It uses the statistics of
three-letter combinations (trigraphs) taken from whatever dictionaries you
feed it.
Generate 7 passwords (user names) of length 13:
geek@liv-inspiron:~$ gpw 7 13
sreepoidahsas
risadiestinge
ntodynesssine
deodstestress
natinglumperm
riasigentspir
enderiferback
apg
personally.) – Sparhawk Sep 20 '15 at 13:07apg
to generate a random string. – landroni Sep 20 '15 at 15:51/dev/urandom
). Would be nice to have some answers using true random number generators, based on e.g. random.org. – landroni Sep 21 '15 at 11:23