[TriLUG] back on topic... MD5 passwords for adding users ?
nalin at redhat.com
Fri Sep 7 18:18:11 EDT 2001
On Fri, Sep 07, 2001 at 05:03:30PM -0400, Donald Ball wrote:
> > I need the "MD5 password generator" that it's referring to! I've seen
> > some comments that crypt(3) in Linux can handle MD5 passwords, but
> > there is no documentation in "man 3 crypt" on this, and I feel I'd be
> > reinventing the wheel anyway to write a C program to do this.
> doesn't the crypt() function do md5 'encryption' if the magic $1$ string
> is the first part of the salt string?
It does. You can supply up to 8 bytes of salt characters with md5crypt:
perl -e 'print crypt("password","\$1\$saltines")'
python -c 'import crypt;print crypt.crypt("password","$1$saltines")'
More information about the TriLUG