User Tools

Site Tools


howtos:password_generator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howtos:password_generator [d/m/Y H:i] (current)
Line 1: Line 1:
 +Put this little script into you ~/.bashrc and you can run it from anywhere:
  
 +<​file>​
 +genpasswd() {
 + local l=$1
 +        [ "​$l"​ == ""​ ] && l=20
 +      tr -dc A-Za-z0-9_ < /​dev/​urandom | head -c ${l} | xargs
 +}
 +</​file>​
 +
 +It takes one parameter which says how long a password you want:
 +
 +<​code>​
 +tdd@s10e-tdd:​~$ genpasswd 10
 + ​EpVrnblbz_
 +
 +tdd@s10e-tdd:​~$ ​
 +</​code>​
 +
 +
 +
 +----
 +Source: http://​www.cyberciti.biz/​tips/​linux-unix-bsd-openssh-server-best-practices.html
howtos/password_generator.txt · Last modified: d/m/Y H:i (external edit)