PDA

View Full Version : AuthDBMUserFile


dpalme
December 24th, 2009, 23:43
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:


<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:


[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.....

dpalme
December 26th, 2009, 04:07
Guess nobody has ever seen this....wow

DutchDaemon
December 26th, 2009, 04:18
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?

dpalme
December 26th, 2009, 21:21
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
December 26th, 2009, 22:02
Probably, yes ;) But test it with AuthUserFile and a regular htpasswd file as well (to make sure the basic concept works).

dpalme
December 26th, 2009, 22:45
This is a bit strange.

I changed the Directory directive to the following:


<Directory "/home/dougpalme/www/data/stats">
AllowOverride Authconfig
</Directory>


I then created a new dbm file with .htpasswd and added a .htaccess file


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.