DBM Authentication

DBM Authentication

Post by Daniel Matto » Thu, 11 Jun 1998 04:00:00



I am trying to replace the regular Authentication with DBM files
but it not working. Any help will be verry apreciated.

I added the following lines to the 'Configuration' file:"
EXTRA_LIBS=/usr/local/lib/libgdbm.a /usr/local/lib/libdb.a
...
Module db_auth_module      mod_auth_db.o
Module dbm_auth_module     mod_auth_dbm.o
...
My .htaccess file works fine with this line:
AuthUserFile /path/to/passwd/.htpasswd

The authentication always fail on this one, even for defined users
created with dbmmanage.pl:
AuthDBMUserFile /path/to/passwd/dbmusers

The error_logs file:
[Wed Jun 10 15:01:50 1998] access to /path/to/passwd/dbmusers failed for
20X.14.12X
.156, reason: could not open dbm auth file
[Wed Jun 10 15:01:50 1998] access to /path/to/htdocs/test failed for
20X.14.12X.12X
, reason: DBM user username not found

(I even change the restrictions to 777 to see if the file was read.)

Running Apache (last version) on OSF1(Digital-alpha), tried on Solaris
2.6 also.

Am I missing any step?

Thanks in advance!

 
 
 

DBM Authentication

Post by Leslie Mikese » Sat, 13 Jun 1998 04:00:00



Quote:>I am trying to replace the regular Authentication with DBM files
>but it not working. Any help will be verry apreciated.

>I added the following lines to the 'Configuration' file:"
>EXTRA_LIBS=/usr/local/lib/libgdbm.a /usr/local/lib/libdb.a
>...
>Module db_auth_module      mod_auth_db.o
>Module dbm_auth_module     mod_auth_dbm.o
>...
>My .htaccess file works fine with this line:
>AuthUserFile /path/to/passwd/.htpasswd

>The authentication always fail on this one, even for defined users
>created with dbmmanage.pl:
>AuthDBMUserFile /path/to/passwd/dbmusers

>The error_logs file:
>[Wed Jun 10 15:01:50 1998] access to /path/to/passwd/dbmusers failed for
>20X.14.12X
>.156, reason: could not open dbm auth file
>[Wed Jun 10 15:01:50 1998] access to /path/to/htdocs/test failed for
>20X.14.12X.12X
>, reason: DBM user username not found

>(I even change the restrictions to 777 to see if the file was read.)

>Running Apache (last version) on OSF1(Digital-alpha), tried on Solaris
>2.6 also.

>Am I missing any step?

There are some strange quirks when you mix db and gdbm libraries with
programs that use the ndbm interface since both libraries can provide
it.  You probably have perl using db's ndbm and apache using gdbm's
or vice versa.   Gdbm will create files with .dir and .pag extensions
but linked to each other in ndbm emulation but otherwise exactly the
same as in gdbm mode.  To make matters worse some platforms have
a native ndbm library in addition to the portable ones.  You can control
perl with the AnyDBM_File.pm, and I assume the library link order
sets it for apache.  

  Les Mikesell