What to do with the htpasswd program?

Michael Smith (mjs@cursci.co.uk)
Wed, 28 Aug 1996 12:01:10 +0100

Message-Id: <322426F6.A366943@cursci.co.uk>
Date: Wed, 28 Aug 1996 12:01:10 +0100
From: Michael Smith <mjs@cursci.co.uk>
To: fastcgi-developers@OpenMarket.com
Subject: What to do with the htpasswd program?

I would like to be able to use htpasswd (from the apache support
directory) in a fastCGI script.  In CGI I call this like so:

    open(PASS,"| htpasswd /opt/.htpasswd $user") || return 0;
    print PASS $newpass . "\n";
    close PASS;

This kind of thing doesn't seem to work with fastCGI, presumably because
of changes in the way stdin/stdout is used.  In which case, how should I
call it?  Has anyone altered htpasswd so you don't need to pipe to it?
Otherwise I'd rather not mess about with it - there are other programs
I'd like to use in this way too.  Or is there some way to execute it as
a system which would be a better idea?

Thanks

Michael Smith