LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

How to generate password

Posted 02-21-2009 at 08:56 AM by ErV

Generating password is simple:

password8.sh:
[code]
#!/bin/sh
cat /dev/urandom| tr -dc '0-9a-zA-Z!@#$%^&*_+-'|head -c 8;echo
[/code]
This script generates 8 characters long password.
To change number of characters, replace 8 with other number.
'0-9a-zA-Z!@#$%^&*_+-' defines character set used in password. If you need another charset, change this string to suit your needs.
ErV
Senior Member
Posted in Uncategorized
Views 3231 Comments 0 ErV is offline

  



All times are GMT -5. The time now is 06:56 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration