httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Vandersteegen <>
Subject [users@httpd] md5 password authentification
Date Fri, 09 Jul 2004 13:38:50 GMT

thx for reading this problem on a win2000 machine with apache 2.0.49.

My problem concerns the use of md5-passwords created with htpasswd2.
Simply put: I want to check if a given username and its password correspond 
with the hashed_passwd in a stored ./password_file?

More in detail:
I have a ./password_file created with:
htpasswd2 -cmb password_file userfoo  passwordfoo

I have a loginname:userfoo and a password: passwordfoo.
I want to see if this "passwordfoo" is the same password hashed in my 

I've tried to see the hashed_line of userfoo and its passwordfoo with  a 
simple php-script:
(most important line:)
         $hashed_password = 
shell_exec('c:\utilities\xampp\apache\bin\htpasswd -n -b -m userfoo 

The problems I have with this $hashed_password:
         * not the same as the one in the ./password_file
           * it changes everytime I run the script!

Is there a function to check if a user: userfoo and its password: 
passwordfoo correspond with the value stored in the ./password_file????

Thx a lot for reading so far.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message