Subject: Re: command line DES/MD5 encryption
To: John Maier <jmaier@midamerica.net>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-users
Date: 07/23/2003 13:28:55
On Wed, 23 Jul 2003, John Maier wrote:

> I figured there are other who like me are going to run into this and will
> benefit from reading this and shortening other's develop time.
>
> Perhaps it's wishful thinking that NetBSD would have a command that returns
> something like:
> >crpyt -t md5 -s 4testing
> $1$4fT3f4.S$1LEh3gouRxJouduA9vPj40

Maybe mkpasswd (actually ircd-hybrid-mkpasswd) from
pkgsrc/chat/ircd-hybrid can do this.

htpasswd (from Apache) can also create MD5 passwords, but prompts for
password when outputing to standard output. (That would be an easy fix and
maybe already is fixed in newer version.)

Maybe the perl script ftpasswd (for proftpd) could also be adapted.

The OpenBSD encrypt(1) (aka makekey) command can make md5 passwords.
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/encrypt/

 > encrypt -m 4testing
 $1$7A0ez38C$aM1toQcaJsCJdX9JdjzQN.

Also NetBSD's /usr/libexec/makekey could be made smarter to do md5 also.

encrypt or improving makekey would probably be best. (On OpenBSD, makekey
is encrypt.)

   Jeremy C. Reed
   http://bsd.reedmedia.net/