[olug] mod_auth_db on redhat
Adam Haeder
adamh at omaha.org
Wed Dec 12 16:27:12 UTC 2001
Very frustrating situation.
I've got a new load of RedHat 7.2 on a system. The apache rpms that come
with RedHat 7.2 include mod_auth_db, which allows me to set up certain
directories to authenticate against a Berkely DB database. I can use the
'dbmmanage' program that comes with Apache to create these databases.
THis works fine. So far so good.
Now, what I usually do with a RedHat system is uninstall all the apache
rpms and reinstall everything from source. So I rpm -e all the apache
stuff, download the latest 1.3.22, and ./configure, make, make install. I
enable a number of different modules, including mod_auth_db. ./configure's
output notes that:
db_auth_module uses ConfigStart/End
using Berkeley-DB/3.x for mod_auth_db (-ldb)
which is grand (so I think).
So apache is installed and serves pages. I modify the / directory entry in
httpd.conf to look like this:
<Directory />
Options FollowSymLinks
AllowOverride None
AuthName "Auth Test"
AuthType Basic
AuthDBUserFile /usr/local/apache/portfolio
require valid-user
</Directory>
Then is use the command
/usr/local/apache/bin/dbmmanage /usr/local/apache/portfolio adduser adamh
(then give a password) to create a user adamh in the auth file. So far so
good, 'dbmmanage portfolio view' shows me that there is a user adamh in
there.
So I restart apache, and try to hit the homepage. I get a login prompt,
but it doesn't accept any of my info. The error log reports:
[Wed Dec 12 10:08:28 2001] [error] [client 127.0.0.1] (22)Invalid argument: could not open
db auth file: /usr/local/apache/portfolio
[Wed Dec 12 10:08:28 2001] [error] [client 127.0.0.1] DB user adamh not found: /usr/local/apache/htdocs
So it can't even open the db auth file. The 'file' command tells me:
portfolio: Berkeley DB (Hash, version 7, native byte-order)
So obviously the db format that dbmmanage is writing and the db format
that mod_auth_db is expecting are not the same. Dbmmanage is just a perl
script that calls DB_File to read a database. I've verified that it is
using DB_File and not any other database.
I'm not really sure where to go from here. ./configure on apache tells me
that mod_auth_db is using Berkley db3 (I've got rpms installed for db1,
db2 and db3), but when I watch apache compile, one of the include
directories is /usr/include/db1. /usr/include/db.h is a symlink to
/usr/include/db3/db.h, and I've tried changing that to /usr/include/db1
and /usr/include/db2 and recompiling apache but to no avail.
Has anyone else run into this? THanks in advance
--
Adam Haeder
Technical Coordinator, AIM Institute
adamh at omaha.org
(402) 345-5025 x115
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
For help contact olug-help at bstc.net - run by ezmlm
to unsubscribe, send mail to olug-unsubscribe at bstc.net
or `mail olug-unsubscribe at bstc.net < /dev/null`
(c)2001 OLUG http://www.olug.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
More information about the OLUG
mailing list