Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache .htpasswd autht fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
The_Bell
Apprentice
Apprentice


Joined: 01 Jul 2002
Posts: 157

PostPosted: Fri Nov 15, 2002 10:05 pm    Post subject: Apache .htpasswd autht fails Reply with quote

I am running an Apache web server and I added this .htaccess file ina dir I want to be user/password restricted:
Code:
AuthUserFile .htpassword
AuthGroupFile /dev/null
AuthName "Sistema de Fitxers"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>

The server seems to parse the file OK, because it prompts me for a username and a passqord, but whatever I type (correct or incorrect passwords), the don't seem to be working and I cannot acces the directori. I created the .htpassword file using
Code:
htpasswd -c -b .htpassword username <password>


Could anyone help?
_________________
Live long and prosper
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Fri Nov 15, 2002 10:25 pm    Post subject: Reply with quote

This is probably not going to be very helpful, but a couple of security notes: I would recommend not surrounding require valid-user in a <Limit> directive: there's no benefit to doing so, and it will leave other methods unprotected. Secondly, I don't recommend storing passwords in any form underneath ServerRoot - put them someplace totally outside the accessible directory.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
mglauche
Retired Dev
Retired Dev


Joined: 25 Apr 2002
Posts: 564
Location: Germany

PostPosted: Fri Nov 15, 2002 10:52 pm    Post subject: Reply with quote

have a look into the .htpasswd file and check if it looks like:
<username>:<crypted password>

also . double check that apache can read the .htaccess file ! :) (if you did create it as root, perhaps it got 640 or similar permissions, and apache/nobody can't read it)
Back to top
View user's profile Send private message
mglauche
Retired Dev
Retired Dev


Joined: 25 Apr 2002
Posts: 564
Location: Germany

PostPosted: Fri Nov 15, 2002 10:53 pm    Post subject: Reply with quote

oh, another good thing to look at might be the apache error log :) usually in /var/log/apache/error.log
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum