# AuthDBMUserFile



## dpalme (Dec 24, 2009)

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 (Dec 26, 2009)

Guess nobody has ever seen this....wow


----------



## DutchDaemon (Dec 26, 2009)

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 (Dec 26, 2009)

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 (Dec 26, 2009)

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


----------



## dpalme (Dec 26, 2009)

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.


----------

