PDA

View Full Version : .htaccess and .htpassword not working!


SCDLT
03-28-2003, 07:37 PM
I have been working on this damned thing for a few hours now and I cant get it to work! I can get the folder to ask for a password but I cant get it to let me log in.

http://scdlt.madbullet.com/187/member/

that is the folder protected by htaccess.

this is the .htaccess file:

AuthName "Members Only Section"
AuthType Basic
AuthUserFile /.htpassword

<Limit GET>
require valid-user
</Limit>
ErrorDocument 401 /loginfailed.htm


and here is my .htpassword file:

test:teH0wLIpW0gyQ


I looked around on the internet and I found a site that said I had to encript the password so I used it's password ecriptor, thats how I got that funny second half of the .htpassword file.

I just want the user:pass to be test:test becuase it is just a test. Please help.

SCDLT
03-28-2003, 07:55 PM
Ok, I searched the web some more and I found a few more .htpassword encoders and everytime I entered test/test for user and pass each one would give me a diffrent password and none of them work. So I'm thinking that is probably the problem. Does anyone have a link to a htpassword encoder that works?

kevin
03-28-2003, 11:24 PM
try:

.htpasswds

instead of:

.htpassword

SCDLT
03-29-2003, 10:13 AM
Thanx, but that didn't work. Any other ideas?

<htmlite>
03-29-2003, 10:43 AM
the password file should be...
.htpasswd

this may (or may not) help to...
http://www.htmlite.com/HTA006.php

matrixrabbit
03-30-2003, 11:35 AM
Are you running your own server? I run an apache server and for the .htpasswd file I have to use the encryption program that was provided with apache to encrypt the password. To use mine (I'm on linux), i just type in "htpasswd -c .htpasswd test" which would create a new file called .htpasswd with the user name test.

I think that the apache server has a specific encryption code that only THAT server can interpert. That's my theory, i only think that becuase if they had a universal encryption code for apache, that could be a serious security risk.

SCDLT
03-30-2003, 03:30 PM
hmmm, well I'm not running my own server. I think I will ask my host if there is something specific I have to do to make the encription correct. Nothing I have tried yet has worked.

scoutt
03-31-2003, 04:16 PM
for one your .htaccess file isn't right. try giving the full path to the .htpasswd file.

then change things to this

AuthUserFile /your/path/to/.htpasswd
AuthGroupFile /dev/null
AuthName "Members Only Section"
AuthType Basic

<Limit GET PUT POST>
require user test
satisfy all
</Limit>

if you want more than 1 usr to use this then you have to create a .htgroup file