mod_auth_db.html revision 65a1588701f9e5d0f62261d0da85733a23edc92f
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <meta name="generator" content="HTML Tidy, see www.w3.org" />
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <!--#include virtual="header.html" -->
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>This module provides for user authentication using Berkeley
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync DB files.</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Status:</strong></a> Extension<br />
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync auth_db_module</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync href="mod_auth_dbm.html">DBM</a> files for those systems which
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync support DB and not DBM. It is only available in Apache 1.1 and
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>On some BSD systems (<em>e.g.</em>, FreeBSD and NetBSD) dbm
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync is automatically mapped to Berkeley DB. You can use either <a
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync href="mod_auth_dbm.html">mod_auth_dbm</a> or mod_auth_db. The
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync latter makes it more obvious that it's Berkeley DB. On other
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync platforms where you want to use the DB library you usually have
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync to install it first. See <a
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync href="http://www.sleepycat.com/">http://www.sleepycat.com/</a>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync for the distribution. The interface this module uses is the one
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync from DB version 1.85 and 1.86, but DB version 2.x can also be
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync used when compatibility mode is enabled.</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li><a href="#authdbgroupfile">AuthDBGroupFile</a></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li><a href="#authdbuserfile">AuthDBUserFile</a></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync href="#authdbauthoritative">AuthDBAuthoritative</a></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>See also: <a href="core.html#satisfy">satisfy</a> and <a
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync name="authdbgroupfile">AuthDBGroupFile directive</a></h2>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <!--%plaintext <?INDEX {\tt AuthDBGroupFile} directive> -->
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Syntax:</strong></a> AuthDBGroupFile
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Context:</strong></a> directory,
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync .htaccess<br />
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Override:</strong></a> AuthConfig<br />
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Status:</strong></a> Extension<br />
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Module:</strong></a> mod_auth_db
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>The AuthDBGroupFile directive sets the name of a DB file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync containing the list of user groups for user authentication.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <em>File-path</em> is the absolute path to the group file.</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>The group file is keyed on the username. The value for a
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync user is a comma-separated list of the groups to which the users
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync belongs. There must be no whitespace within the value, and it
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync must never contain any colons.</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>Security: make sure that the AuthDBGroupFile is stored
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync outside the document tree of the web-server; do <em>not</em>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync put it in the directory that it protects. Otherwise, clients
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync will be able to download the AuthDBGroupFile unless otherwise
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync protected.</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>Combining Group and Password DB files: In some cases it is
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync easier to manage a single database which contains both the
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync password and group details for each user. This simplifies any
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync support programs that need to be written: they now only have to
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync deal with writing to and locking a single DBM file. This can be
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync accomplished by first setting the group and password files to
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync point to the same DB file:</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <blockquote>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </blockquote>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync The key for the single DB record is the username. The value
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync consists of
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <blockquote>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <code>Unix Crypt-ed Password : List of Groups [ : (ignored)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </blockquote>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync The password section contains the Unix crypt() password as
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync before. This is followed by a colon and the comma separated
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync list of groups. Other data may optionally be left in the DB
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync file after another colon; it is ignored by the authentication
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>See also <a href="core.html#authname">AuthName</a>, <a
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync name="authdbuserfile">AuthDBUserFile</a> directive</h2>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <!--%plaintext <?INDEX {\tt AuthDBUserFile} directive> -->
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Syntax:</strong></a> AuthDBUserFile
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Context:</strong></a> directory,
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync .htaccess<br />
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Override:</strong></a> AuthConfig<br />
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Status:</strong></a> Extension<br />
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync rel="Help"><strong>Module:</strong></a> mod_auth_db
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>The AuthDBUserFile directive sets the name of a DB file
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync containing the list of users and passwords for user
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync authentication. <em>File-path</em> is the absolute path to the
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync user file.</p>