[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SLUG] MD5 passwords

> John Ferlito <johnf@nospam.inodes.org> wrote:
> > Anyone know of anything similar to makepasswd which will encrypt a
> > password and give you the MD5 encrypted result. ie something I can pass
> > to usermod -p. Even a snippet of perl code or a pointer to the algorithm
> > so I can write some perl code would do.

this is snipped from some of my code so some of the vars are meaningless but
you get the idea


use Crypt::PasswdMD5;
use String::Random qw(random_string);

$salt = random_string("ssssssss");
$md5_pass = unix_md5_crypt($newpassword,$salt);


"I can't buy what I want because it's free. Can't be what they want
because I'm me." - Corduroy, Pearl Jam

SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug