PDA

View Full Version : .htaccess encryption


MachMan
07-08-2000, 10:47
Does anyone know how the password gets encrypted into the .htpasswd file ? Or more to the point the code to do it ?
I'm trying write a Perl script to do this so any help will b appreciated :)

-=Oddbod=-
09-08-2000, 11:27
Yes... at least with apache, it is generated by a program called htpasswd which lives in the $APACHE_ROOT/bin directory.

To generate a password file use something like:

htpasswd -c password.file username

To add a user or change their password omit the -c flag or it will truncate your password file.

Regards,

...

alpha
09-08-2000, 15:22
If you don't have access to htpasswd on the server, the file only contains the password DES encrypted and there are a few freeware utilities around that will DES encrypt words for you.