LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 5490 Comments 0 ErV is offline

  



All times are GMT -5. The time now is 12:24 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration