Click to See Complete Forum and Search --> : .htaccess
Scleppel
10-28-2004, 01:56 PM
Ok, sorry, i know there are a million other threads about .htaccess, and i have looked through them. I have it all working, with the .htaccess file promptimg to enter a username and password. But it doesn't recognise the password i put in the .htpasswd file. It finds the .htpasswd file, and finds my username, but then it doesn't recognise the password. I used this site (http://www.e2.u-net.com/htaccess/make.htm) that i found in another thread to encrypt my password, but it still doesn't recognise the password.
So i don't think my password is encrypted right.
Has anyone else had this problem (apache 2 on Win XP)?
ray326
10-28-2004, 02:15 PM
Why didn't you use the htpasswd command that comes with Apache? That site is probably doing a Unix crypt type password but Apache on Windows uses MD5 I believe. At any rate if you dance with the one who brung ya then the password should work.
Scleppel
10-28-2004, 02:17 PM
when i run the htpasswd file it opens then closes, do you know why this is?
ray326
10-28-2004, 02:21 PM
What are you doing, double clicking it? When I run it with no parameters from a DOS window I get:
D:\ibmapache>htpasswd
Usage:
htpasswd [-cmdps] passwordfile username
htpasswd -b[cmdps] passwordfile username password
-c Create a new file.
-m Force MD5 encryption of the password (default).
-d Force CRYPT encryption of the password.
-p Do not encrypt the password (plaintext).
-s Force SHA encryption of the password.
-b Use the password from the command line rather than prompting for it.
On Windows and TPF systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.
D:\ibmapache>
Note that MD5 is ALWAYS the encryption method on Windows because Windows does not have a crypt.
Scleppel
10-28-2004, 02:34 PM
Thanks, didn't know you had to run it like that