This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Strong password generation

Posted by: Anonymous [ip: 169.233.25.226] on September 26, 2007 01:55 PM
<code>PASSWORD_LENGTH="10" && tr -cd [:graph:] < /dev/urandom | head -c $PASSWORD_LENGTH</code>

Note: I have only confirmed this works on GNU/Linux. OpenBSD's head utility does not support the -c option.



Linux.com developers, please use <a href="http://php.net/nl2br">nl2br</a>!

#

Return to Automated user management with Expect