Home > general, linux > random password generator

random password generator

April 23rd, 2009

I was searching in google how to generate random password and got two good easy to use methods.

First one is the most simplest one

 uuidgen -r | cut -c-8 or uuidgen -t | cut -c-8  

The -r option is for random based uuid generation with help of /dev/random and -t uses system clock plus ethernet address.

Second method is to call a function

function randompass {
        pass= /dev/null 2>&1 || head -c 7)
        echo $pass
} 

now you can call this function in the shell script by just typing the name of the function “randompass”

VN:F [1.9.6_1107]
Rating: 6.2/10 (5 votes cast)
VN:F [1.9.6_1107]
Rating: 0 (from 0 votes)
random password generator, 6.2 out of 10 based on 5 ratings
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Live
  • StumbleUpon
  • Twitter
  • Yahoo! Buzz
  • Reddit
  • Technorati

admin general, linux ,

  1. Suresh M
    September 7th, 2009 at 08:07 | #1

    You can use “mkpasswd”.

    mkpasswd -l 20

    VA:F [1.9.6_1107]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.6_1107]
    Rating: 0 (from 0 votes)
  2. Tom
    May 27th, 2011 at 00:37 | #2

    Hi,

    I think the easiest way is to use some online generators. There are a lot with better functionality than command line (for newbies):
    http://maord.com/
    http://h4sher.net
    http://www.generate-password.com/

    Regards,
    Tom

    VA:F [1.9.6_1107]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.6_1107]
    Rating: 0 (from 0 votes)
  1. No trackbacks yet.

Spam Protection by WP-SpamFree