]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_authn_dbm.xml
Rebuild.
[apache] / docs / manual / mod / mod_authn_dbm.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
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
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
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.
21 -->
22
23 <modulesynopsis metafile="mod_authn_dbm.xml.meta">
24
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>
30
31 <summary>
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>
37
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>
43 </summary>
44
45 <seealso><directive module="mod_authn_core">AuthName</directive></seealso>
46 <seealso><directive module="mod_authn_core">AuthType</directive></seealso>
47 <seealso>
48   <directive module="mod_auth_basic">AuthBasicProvider</directive>
49 </seealso>
50 <seealso>
51   <directive module="mod_auth_digest">AuthDigestProvider</directive>
52 </seealso>
53 <seealso><program>htpasswd</program></seealso>
54 <seealso><program>htdbm</program></seealso>
55 <seealso><a href="../misc/password_encryptions.html">Password Formats</a></seealso>
56
57 <directivesynopsis>
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>
63 </contextlist>
64 <override>AuthConfig</override>
65
66 <usage>
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
70     the user file.</p>
71
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
75     server.</p>
76
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>
82     </note>
83
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
88     more information.</p>
89
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
97     problem.</p>
98
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>
105 </usage>
106 </directivesynopsis>
107
108 <directivesynopsis>
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>
115 </contextlist>
116 <override>AuthConfig</override>
117
118 <usage>
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>
123
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>
128
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>
131 </usage>
132 </directivesynopsis>
133
134 </modulesynopsis>