1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 This file is generated from xml source: DO NOT EDIT
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7 --><title>mod_authn_dbm - Apache HTTP Server</title><link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /><link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /><link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link href="../images/favicon.ico" rel="shortcut icon" /></head><body><div id="page-header"><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p><p class="apache">Apache HTTP Server Version 2.0</p><img alt="" src="../images/feather.gif" /></div><div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div><div id="path"><a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs-project/">Documentation</a> > <a href="../">Version 2.0</a> > <a href="./">Modules</a></div><div id="page-content"><div id="preamble"><h1>Apache Module mod_authn_dbm</h1><table class="module"><tr><th><a href="module-dict.html#Description">Description:
8 </a></th><td>User authentication using DBM files</td></tr><tr><th><a href="module-dict.html#Status">Status:
9 </a></th><td>Extension</td></tr><tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:
10 </a></th><td>authn_dbm_module</td></tr><tr><th><a href="module-dict.html#SourceFile">Source File:
11 </a></th><td>mod_authn_dbm.c</td></tr><tr><th><a href="module-dict.html#Compatibility">Compatibility:
12 </a></th><td>Available in Apache 2.0.42 and later</td></tr></table><h3>Summary</h3>
13 <p>This module provides authentication front-ends such as
14 <code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code> and <code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code>
15 to authenticate users by looking up users in plain text password files.
16 Similar functionality is provided by <code class="module"><a href="../mod/mod_authn_file.html">mod_authn_file</a></code>.</p>
18 <p>When using <code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code> or
19 <code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code>, this module is invoked via the
20 <code class="directive"><a href="../mod/mod_auth_basic.html#authbasicprovider">AuthBasicProvider</a></code> or
21 <code class="directive"><a href="../mod/mod_auth_digest.html#authdigestprovider">AuthDigestProvider</a></code>
22 with the 'dbm' value.</p>
23 </div><div id="quickview"><h3 class="directives">Directives</h3><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#authdbmauthoritative">AuthDBMAuthoritative</a></li><li><img alt="" src="../images/down.gif" /> <a href="#authdbmtype">AuthDBMType</a></li><li><img alt="" src="../images/down.gif" /> <a href="#authdbmuserfile">AuthDBMUserFile</a></li></ul><h3>See also</h3><ul class="seealso"><li><code class="directive"><a href="../mod/core.html#authname">AuthName</a></code></li><li><code class="directive"><a href="../mod/core.html#authtype">AuthType</a></code></li><li>
24 <code class="directive"><a href="../mod/mod_auth_basic.html#authbasicprovider">AuthBasicProvider</a></code>
26 <code class="directive"><a href="../mod/mod_auth_digest.html#authdigestprovider">AuthDigestProvider</a></code>
27 </li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AuthDBMAuthoritative" id="AuthDBMAuthoritative">AuthDBMAuthoritative</a> <a name="authdbmauthoritative" id="authdbmauthoritative">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
28 </a></th><td>Sets whether authentication and authorization will be
29 passwed on to lower level modules</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
30 </a></th><td>AuthDBMAuthoritative on|off</td></tr><tr><th><a href="directive-dict.html#Default">Default:
31 </a></th><td><code>AuthDBMAuthoritative on</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
32 </a></th><td>directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
33 </a></th><td>AuthConfig</td></tr><tr><th><a href="directive-dict.html#Status">Status:
34 </a></th><td>Extension</td></tr><tr><th><a href="directive-dict.html#Module">Module:
35 </a></th><td>mod_authn_dbm</td></tr></table>
37 <p>Setting the <code class="directive">AuthDBMAuthoritative</code>
38 directive explicitly to <strong>'off'</strong> allows for both
39 authentication and authorization to be passed on to lower level
40 modules (as defined in the <code>Configuration</code> and
41 <code>modules.c</code> file if there is <strong>no userID</strong>
42 or <strong>rule</strong> matching the supplied userID. If there is
43 a userID and/or rule specified; the usual password and access
44 checks will be applied and a failure will give an Authorization
47 <p>So if a userID appears in the database of more than one module;
48 or if a valid <code class="directive"><a href="../mod/core.html#require">Require</a></code>
49 directive applies to more than one module; then the first module
50 will verify the credentials; and no access is passed on;
51 regardless of the <code class="directive">AuthAuthoritative</code> setting.</p>
53 <p>A common use for this is in conjunction with one of the
54 auth providers; such as <code class="module"><a href="../mod/mod_authn_file.html">mod_authn_file</a></code>. Whereas this
55 DBM module supplies the bulk of the user credential checking; a
56 few (administrator) related accesses fall through to a lower
57 level with a well protected .htpasswd file.</p>
59 <p>By default, control is not passed on and an unknown userID
60 or rule will result in an Authorization Required reply. Not
61 setting it thus keeps the system secure and forces an NCSA
62 compliant behaviour.</p>
64 <p>Security: Do consider the implications of allowing a user to
65 allow fall-through in his .htaccess file; and verify that this
66 is really what you want; Generally it is easier to just secure
67 a single .htpasswd file, than it is to secure a database which
68 might have more access interfaces.</p>
69 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AuthDBMType" id="AuthDBMType">AuthDBMType</a> <a name="authdbmtype" id="authdbmtype">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
70 </a></th><td>Sets the type of database file that is used to
71 store passwords</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
72 </a></th><td>AuthDBMType default|SDBM|GDBM|NDBM|DB</td></tr><tr><th><a href="directive-dict.html#Default">Default:
73 </a></th><td><code>AuthDBMType default</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
74 </a></th><td>directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
75 </a></th><td>AuthConfig</td></tr><tr><th><a href="directive-dict.html#Status">Status:
76 </a></th><td>Extension</td></tr><tr><th><a href="directive-dict.html#Module">Module:
77 </a></th><td>mod_authn_dbm</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
78 </a></th><td>Available in version 2.0.30 and later.</td></tr></table>
80 <p>Sets the type of database file that is used to store the passwords.
81 The default database type is determined at compile time. The
82 availability of other types of database files also depends on
83 <a href="../install.html#dbm">compile-time settings</a>.</p>
85 <p>It is crucial that whatever program you use to create your password
86 files is configured to use the same type of database.</p>
87 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AuthDBMUserFile" id="AuthDBMUserFile">AuthDBMUserFile</a> <a name="authdbmuserfile" id="authdbmuserfile">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
88 </a></th><td>Sets the name of a database file containing the list of users and
89 passwords for authentication</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
90 </a></th><td>AuthDBMUserFile <em>file-path</em></td></tr><tr><th><a href="directive-dict.html#Context">Context:
91 </a></th><td>directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
92 </a></th><td>AuthConfig</td></tr><tr><th><a href="directive-dict.html#Status">Status:
93 </a></th><td>Extension</td></tr><tr><th><a href="directive-dict.html#Module">Module:
94 </a></th><td>mod_authn_dbm</td></tr></table>
95 <p>The <code class="directive">AuthDBMUserFile</code> directive sets the
96 name of a DBM file containing the list of users and passwords for
97 user authentication. <em>File-path</em> is the absolute path to
100 <p>The user file is keyed on the username. The value for a user is
101 the <code>crypt()</code> encrypted password, optionally followed
102 by a colon and arbitrary data. The colon and the data following it
103 will be ignored by the server.</p>
105 <p>Security: make sure that the
106 <code class="directive">AuthDBMUserFile</code> is stored outside the
107 document tree of the web-server; do <em>not</em> put it in the
108 directory that it protects. Otherwise, clients will be able to
109 download the <code class="directive">AuthDBMUserFile</code>.</p>
111 <p>Important compatibility note: The implementation of
112 "dbmopen" in the apache modules reads the string length of the
113 hashed values from the DBM data structures, rather than relying
114 upon the string being NULL-appended. Some applications, such as
115 the Netscape web server, rely upon the string being
116 NULL-appended, so if you are having trouble using DBM files
117 interchangeably between applications this may be a part of the
120 <p>A perl script called
121 <a href="../programs/dbmmanage.html">dbmmanage</a> is included with
122 Apache. This program can be used to create and update DBM
123 format password files for use with this module.</p>
124 </div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div></body></html>