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

Re: Suggestions wanted: how to generated MD5-encrypted passwords?



"Steve \"Stevers!\" Coile" wrote:

> I'd like to write a script that generates MD5-encrypted passwords in a
> Red Hat Linux 4.1 environment.  Anyone have any suggestions how best to
> do this?
> 
> I've got a copy of md5_crypt.c from the Linux-PAM pwdb module.  I was
> considering converting it to Perl, but I'm not fond of that idea.
> Another option would be to write a simple wrapper program that reads
> a string from standard input, passes it to md5_crypt, and sends the
> encrypted password to standard output.

If you just want to generate random values, use `mcookie'; it
generates a random 128-bit value and prints it in hex.

If you want an md5 hash of a specific block of data, use md5sum.

-- 
Glynn Clements <glynn@sensei.co.uk>



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