[TriLUG] back on topic... MD5 passwords for adding users ?

jeremyp at pobox.com jeremyp at pobox.com
Fri Sep 14 10:50:32 EDT 2001


On Fri, 7 Sep 2001, Nalin Dahyabhai wrote:

> 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?
> > 
> > http://www.gnu.org/manual/glibc-2.2.3/html_chapter/libc_32.html
> 
> 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")'

Thanks a lot for the info.  I didn't realize that the man pages were so
out-of-date for glibc stuff.  My script works quite well now. :)

Sorry for the late reply.

Regards,
Jeremy






More information about the TriLUG mailing list