AuthDBMUserFile

dpalme

Well-Known Member

Thanks: 3
Messages: 285

#1
For whatever reason and I am sure it is something I DID AGAIN, but I am having a difficult time getting this to work.

I have setup a directory directive in the httpd-vhosts.conf file with the following:

Code:
<Directory "/home/dougpalme/www/data/stats/">
    AuthName "Private"
    AuthType Basic
    AuthDBMUserFile /home/dougpalme/statsdbm
    Require valid-user
</Directory>
I then created the file using the dbmmanage utility and then restarted apache....but it does not work. Throws me an internal server error, and when checking the logs I get the following:

Code:
[Thu Dec 24 14:41:52 2009] [error] [client 98.215.234.106] (9)Bad file descriptor: Could not open password file: (null)
If someone would be kind enough to point where I might be wrong.....I copied the setup from apache and double checked it, it appears right but obviously the results are the proof in the pudding.....
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 2,688
Messages: 11,241

#3
Nope. Took a long hard look at it yesterday, but assuming you have the proper module loaded (which it is by default) and the password file is accessible, I see no reason why it wouldn't work. Is there a specific reason for using AuthDBMUserFile instead of AuthUserFile?
 
OP
OP
D

dpalme

Well-Known Member

Thanks: 3
Messages: 285

#4
Not really except that I was using a dbm file and from what I read, to use the dbm file you need to use the authdbmuserfile, is that correct?
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 2,688
Messages: 11,241

#5
Probably, yes ;) But test it with AuthUserFile and a regular htpasswd file as well (to make sure the basic concept works).
 
OP
OP
D

dpalme

Well-Known Member

Thanks: 3
Messages: 285

#6
This is a bit strange.

I changed the Directory directive to the following:

Code:
<Directory "/home/dougpalme/www/data/stats">
   AllowOverride Authconfig
</Directory>
I then created a new dbm file with .htpasswd and added a .htaccess file

Code:
AuthUserFile    /home/statsdbm
AuthGroupFile /dev/null
AuthName        "Test"
AuthType        Basic
require         valid-user
restarted apache and now I am not prompted at all. Even if I take the directive out, or the htaccess file, nothing ever checks for a username and password.
 
Top