# DBM authentication requiring AuthUserFile?



## dpalme (Aug 20, 2017)

I need to secure a directory on the apache server, so I turned on dbm in the httpd.conf


```
LoadModule authn_dbm_module libexec/apache24/mod_authn_dbm.so
```

I created the DBM file, added a simple index.html file and added the following to the httpd-vhosts file:


```
<Directory "/home/tth/www/data/app">
  AuthName "restricted stuff"
  AuthType Basic
  AuthDBMUserFile "/home/tth/www/dbuser"
  require valid-user
</Directory>
```

restarted apache, the password screen pops up but then I get an internal server error and the following in the error_log:
`[Sun Aug 20 10:37:32.882701 2017] [authn_file:error] [pid 85477] [client xx.xxx.
xxx.xxx:62870] AH01619: AuthUserFile not specified in the configuration`

Any idea what I'm doing wrong here?


----------



## SirDice (Aug 21, 2017)

You need to set AuthBasicProvider. Or else it's going to use the default from mod_authn_file.

https://httpd.apache.org/docs/2.4/mod/mod_authz_dbm.html
https://httpd.apache.org/docs/2.4/mod/mod_auth_basic.html


----------



## dpalme (Aug 23, 2017)

I have that what is a little unusual, if I use the htdbm command it works perfectly. If I use dbmmanage to create the file and add the user, it still errors out.


----------

