Thursday, April 22, 2010

Strong password generator

Here is a random password generator (put in your ~/.bashrc):
genpasswd() {
  local l=$1
  [ "$l" == "" ] && l=20
  tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
}
Run it:
genpasswd 8
Here is output:
Kh5FwyTi
See original article here (item #10).

Debian Packages

Debian provides makepasswd, apg and pwgen packages which provide programs (the name is the same as the package) that can be used for this purpose. Makepasswd will generate true random passwords with an emphasis on security over pronounceability while pwgen will try to make meaningless but pronounceable passwords.
deby01:~$ apg -m 14 -x 14 -M SNCl
dob4IpOfvosOp@
TrinVop
9twagNobryiph/
cewd4om\queOph

deby01:~$ makepasswd --chars 14
w7RWMqKxjMGgfV

deby01:~$ pwgen
Aezoo3ae doo1Phoe jac6eTai die4zeaG 
Tu1nee7P JioPh4wu the8Luub xeiNga3K 
...

1 comment :

  1. Password issue is needful in our traditional way of life with internet world.Most of have addicted with online services like e-banking,shopping,sharing data and exchange the many sources.So the password play in key role in our life to maintain all of services.As a result it is needed to written too strong and complex.

    ReplyDelete