You could try piping a file to passwd.
I am not sure if it would work.
You can always write a php script to handle the passwds.
Here is the encryption code.
function phpCrypt( $pass )
{
$salt=chr(rand( ord('a'),ord('z') )).chr(rand(ord('a'),ord('z')));
return crypt( $pass , $salt );
}
You just need to add this to the .htpasswd
username:encrptyedpasswd
Halfabee