2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_authn_dbm.xml.meta">
25 <name>mod_authn_dbm</name>
26 <description>User authentication using DBM files</description>
27 <status>Extension</status>
28 <sourcefile>mod_authn_dbm.c</sourcefile>
29 <identifier>authn_dbm_module</identifier>
32 <p>This module provides authentication front-ends such as
33 <module>mod_auth_digest</module> and <module>mod_auth_basic</module>
34 to authenticate users by looking up users in <dfn>dbm</dfn> password
35 files. Similar functionality is provided by
36 <module>mod_authn_file</module>.</p>
38 <p>When using <module>mod_auth_basic</module> or
39 <module>mod_auth_digest</module>, this module is invoked via the
40 <directive module="mod_auth_basic">AuthBasicProvider</directive> or
41 <directive module="mod_auth_digest">AuthDigestProvider</directive>
42 with the <code>dbm</code> value.</p>
45 <seealso><directive module="mod_authn_core">AuthName</directive></seealso>
46 <seealso><directive module="mod_authn_core">AuthType</directive></seealso>
48 <directive module="mod_auth_basic">AuthBasicProvider</directive>
51 <directive module="mod_auth_digest">AuthDigestProvider</directive>
53 <seealso><program>htpasswd</program></seealso>
54 <seealso><program>htdbm</program></seealso>
55 <seealso><a href="../misc/password_encryptions.html">Password Formats</a></seealso>
58 <name>AuthDBMUserFile</name>
59 <description>Sets the name of a database file containing the list of users and
60 passwords for authentication</description>
61 <syntax>AuthDBMUserFile <var>file-path</var></syntax>
62 <contextlist><context>directory</context><context>.htaccess</context>
64 <override>AuthConfig</override>
67 <p>The <directive>AuthDBMUserFile</directive> directive sets the
68 name of a DBM file containing the list of users and passwords for
69 user authentication. <var>File-path</var> is the absolute path to
72 <p>The user file is keyed on the username. The value for a user is
73 the encrypted password, optionally followed by a colon and arbitrary
74 data. The colon and the data following it will be ignored by the
77 <note type="warning"><title>Security:</title>
78 <p>Make sure that the <directive>AuthDBMUserFile</directive> is stored
79 outside the document tree of the web-server; do <em>not</em> put it in
80 the directory that it protects. Otherwise, clients will be able to
81 download the <directive>AuthDBMUserFile</directive>.</p>
84 <p>The encrypted password format depends on which authentication
85 frontend (e.g. <module>mod_auth_basic</module> or
86 <module>mod_auth_digest</module>) is being used. See <a
87 href="../misc/password_encryptions.html">Password Formats</a> for
90 <p>Important compatibility note: The implementation of
91 <code>dbmopen</code> in the Apache modules reads the string length of
92 the hashed values from the DBM data structures, rather than relying
93 upon the string being NULL-appended. Some applications, such as
94 the Netscape web server, rely upon the string being
95 NULL-appended, so if you are having trouble using DBM files
96 interchangeably between applications this may be a part of the
99 <p>A perl script called
100 <program>dbmmanage</program> is included with
101 Apache. This program can be used to create and update DBM
102 format password files for use with this module. Another
103 tool for maintaining the DBM files is the included program
104 <program>htdbm</program>.</p>
109 <name>AuthDBMType</name>
110 <description>Sets the type of database file that is used to
111 store passwords</description>
112 <syntax>AuthDBMType default|SDBM|GDBM|NDBM|DB</syntax>
113 <default>AuthDBMType default</default>
114 <contextlist><context>directory</context><context>.htaccess</context>
116 <override>AuthConfig</override>
119 <p>Sets the type of database file that is used to store the passwords.
120 The default database type is determined at compile time. The
121 availability of other types of database files also depends on
122 <a href="../programs/configure.html#options">compile-time settings</a>.</p>
124 <p>For example, in order to enable the support for Berkeley DB
125 (correspondent to the <code>db</code> type) the
126 <code>--with-berkeley-db</code> option needs to be added to httpd's
127 configure to generate the necessary DSO.</p>
129 <p>It is crucial that whatever program you use to create your password
130 files is configured to use the same type of database.</p>