henry,

i've been known to hack a perl script every now and again.  i have more
experience with bash, but i'm not above using perl....   ;)

On Wed, 18 Oct 2000, Henry House wrote:

> On Wed, Oct 18, 2000 at 01:51:46PM -0700, Peter Jay Salzman wrote:
> > does anyone know of a utility that generates a shadow/md5 type encrypted
> > password from plaintext input?
> 
> Not exactly what you want, but perl has a crypt() function.

looked at this - no good.   it appears to only do DES encoded passwords.  i
don't see md5 support.

> > alternatively, is there a 'passwd' type utility that can be used from within
> > a shell script?
> 
> htpasswd -- it comes with Apache. It does do MD5.
 
bleah.  m=md5, b=batchmode c=create new file

        # htpasswd -mbc NewFile newUser password
        Adding password for user newUser

doesn't work.  the output is:

        newUser   :$apr1$mDX6A/..$FchSG1akOnVqQvVW99m4j0

compare that with what's in my shadow file:

        lugod     :$1$dj333333333333333333333333333Y0
        rhonda    :$1$gZ333333333333333333333333333l/
        wellspring:$1$2D333333333333333333333333333Y/

the htpasswd string is too long and doesn't start with $1$.

pete

ps- yes, i changed the above passwords, but left the number of digits the
same.



Reply via email to