]> granicus.if.org Git - apache/blob - docs/manual/programs/dbmmanage.html.en
xforms
[apache] / docs / manual / programs / dbmmanage.html.en
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       -->
8 <title>dbmmanage - Manage user authentication files in DBM format - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
12 <script src="../style/scripts/prettify.js" type="text/javascript">
13 </script>
14
15 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
16 <body id="manual-page"><div id="page-header">
17 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
18 <p class="apache">Apache HTTP Server Version 2.5</p>
19 <img alt="" src="../images/feather.gif" /></div>
20 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
21 <div id="path">
22 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>dbmmanage - Manage user authentication files in DBM format</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/programs/dbmmanage.html" title="English">&nbsp;en&nbsp;</a> |
25 <a href="../ko/programs/dbmmanage.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
26 <a href="../tr/programs/dbmmanage.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
27 </div>
28
29     <p><code>dbmmanage</code> is used to create and update the DBM format files
30     used to store usernames and password for basic authentication of HTTP users
31     via <code class="module"><a href="../mod/mod_authn_dbm.html">mod_authn_dbm</a></code>.
32     Resources available from the Apache HTTP server can be restricted to just
33     the users listed in the files created by <code>dbmmanage</code>. This
34     program can only be used when the usernames are stored in a DBM file. To
35     use a flat-file database see <code class="program"><a href="../programs/htpasswd.html">htpasswd</a></code>.</p>
36
37     <p>This manual page only lists the command line arguments. For details of
38     the directives necessary to configure user authentication in
39     <code class="program"><a href="../programs/httpd.html">httpd</a></code> see the httpd manual, which is part of
40     the Apache distribution or can be found at <a href="http://httpd.apache.org/">http://httpd.apache.org/</a>.</p>
41 </div>
42 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#synopsis">Synopsis</a></li>
43 <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
44 <li><img alt="" src="../images/down.gif" /> <a href="#bugs">Bugs</a></li>
45 </ul><h3>See also</h3><ul class="seealso"><li><code class="program"><a href="../programs/httpd.html">httpd</a></code></li><li><code class="module"><a href="../mod/mod_authn_dbm.html">mod_authn_dbm</a></code></li><li><code class="module"><a href="../mod/mod_authz_dbm.html">mod_authz_dbm</a></code></li></ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
46 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
47 <div class="section">
48 <h2><a name="synopsis" id="synopsis">Synopsis</a></h2>
49     <p><code><strong>dbmmanage</strong> [ <var>encoding</var> ]
50     <var>filename</var> add|adduser|check|delete|update
51     <var>username</var>
52     [ <var>encpasswd</var>
53       [ <var>group</var>[,<var>group</var>...]
54         [ <var>comment</var> ] ] ]</code></p>
55
56     <p><code><strong>dbmmanage</strong> <var>filename</var>
57     view [ <var>username</var> ]</code></p>
58
59     <p><code><strong>dbmmanage</strong> <var>filename</var> import</code></p>
60 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
61 <div class="section">
62 <h2><a name="options" id="options">Options</a></h2>
63     <dl>
64     <dt><code><var>filename</var></code></dt>
65     <dd>The filename of the DBM format file. Usually without the extension
66     <code>.db</code>, <code>.pag</code>, or <code>.dir</code>.</dd>
67
68     <dt><code><var>username</var></code></dt>
69     <dd>The user for which the operations are performed. The <var>username</var>
70     may not contain a colon (<code>:</code>).</dd>
71
72     <dt><code><var>encpasswd</var></code></dt>
73     <dd>This is the already encrypted password to use for the
74     <code>update</code> and <code>add</code> commands. You may use a hyphen
75     (<code>-</code>) if you want to get prompted for the password, but fill
76     in the fields afterwards. Additionally when using the <code>update</code>
77     command, a period (<code>.</code>) keeps the original password
78     untouched.</dd>
79
80     <dt><code><var>group</var></code></dt>
81     <dd>A group, which the user is member of. A groupname may not contain a
82     colon (<code>:</code>). You may use a hyphen (<code>-</code>) if you don't
83     want to assign the user to a group, but fill in the comment field.
84     Additionally when using the <code>update</code> command, a period
85     (<code>.</code>) keeps the original groups untouched.</dd>
86
87     <dt><code><var>comment</var></code></dt>
88     <dd>This is the place for your opaque comments about the user, like
89     realname, mailaddress or such things. The server will ignore this
90     field.</dd>
91     </dl>
92
93     <h3><a name="options.encodings" id="options.encodings">Encodings</a></h3>
94       <dl>
95       <dt><code>-d</code></dt>
96       <dd>crypt encryption (default, except on Win32, Netware)</dd>
97
98       <dt><code>-m</code></dt>
99       <dd>MD5 encryption (default on Win32, Netware)</dd>
100
101       <dt><code>-s</code></dt>
102       <dd>SHA1 encryption</dd>
103
104       <dt><code>-p</code></dt>
105       <dd>plaintext (<em>not recommended</em>)</dd>
106       </dl>
107     
108
109     <h3><a name="options.commands" id="options.commands">Commands</a></h3>
110       <dl>
111       <dt><code>add</code></dt>
112       <dd>Adds an entry for <var>username</var> to <var>filename</var> using the
113       encrypted password <var>encpasswd</var>.
114
115       <div class="example"><p><code>dbmmanage passwords.dat add rbowen foKntnEF3KSXA</code></p></div>
116       </dd>
117
118       <dt><code>adduser</code></dt>
119       <dd>Asks for a password and then adds an entry for <var>username</var> to
120       <var>filename</var>.
121
122       <div class="example"><p><code>dbmmanage passwords.dat adduser krietz</code></p></div>
123       </dd>
124
125       <dt><code>check</code></dt>
126       <dd>Asks for a password and then checks if <var>username</var> is in
127       <var>filename</var> and if it's password matches the specified one.
128
129       <div class="example"><p><code>dbmmanage passwords.dat check rbowen</code></p></div>
130       </dd>
131
132       <dt><code>delete</code></dt>
133       <dd>Deletes the <var>username</var> entry from <var>filename</var>.
134
135       <div class="example"><p><code>dbmmanage passwords.dat delete rbowen</code></p></div>
136       </dd>
137
138       <dt><code>import</code></dt>
139       <dd>Reads <code><var>username</var>:<var>password</var></code> entries
140       (one per line) from <code>STDIN</code> and adds them to
141       <var>filename</var>. The passwords already have to be crypted.</dd>
142
143       <dt><code>update</code></dt>
144       <dd>Same as the <code>adduser</code> command, except that it makes
145       sure <var>username</var> already exists in <var>filename</var>.
146
147       <div class="example"><p><code>dbmmanage passwords.dat update rbowen</code></p></div>
148       </dd>
149
150       <dt><code>view</code></dt>
151       <dd>Just displays the contents of the DBM file. If you specify a
152       <var>username</var>, it displays the particular record only.
153
154       <div class="example"><p><code>dbmmanage passwords.dat view</code></p></div>
155       </dd>
156       </dl>
157     
158 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
159 <div class="section">
160 <h2><a name="bugs" id="bugs">Bugs</a></h2>
161     <p>One should be aware that there are a number of different DBM file formats
162     in existence, and with all likelihood, libraries for more than one format
163     may exist on your system. The three primary examples are SDBM, NDBM, the GNU
164     project's GDBM, and Berkeley DB 2. Unfortunately, all these libraries use
165     different file formats, and you must make sure that the file format used
166     by <var>filename</var> is the same format that <code>dbmmanage</code>
167     expects to see. <code>dbmmanage</code> currently has no way of determining
168     what type of DBM file it is looking at. If used against the wrong format,
169     will simply return nothing, or may create a different DBM file with a
170     different name, or at worst, it may corrupt the DBM file if you were
171     attempting to write to it.</p>
172
173     <p><code>dbmmanage</code> has a list of DBM format preferences, defined by
174     the <code>@AnyDBM::ISA</code> array near the beginning of the program. Since
175     we prefer the Berkeley DB 2 file format, the order in which
176     <code>dbmmanage</code> will look for system libraries is Berkeley DB 2,
177     then NDBM, then GDBM and then SDBM. The first library found will be the
178     library <code>dbmmanage</code> will attempt to use for all DBM file
179     transactions. This ordering is slightly  different than the standard
180     <code>@AnyDBM::ISA</code> ordering in Perl, as well as the ordering used by
181     the simple <code>dbmopen()</code> call in Perl, so if you use any other
182     utilities to manage your DBM files, they must also follow this preference
183     ordering. Similar care must be taken if using programs in other languages,
184     like C, to access these files.</p>
185
186     <p>One can usually use the <code>file</code> program supplied with most
187     Unix systems to see what format a DBM file is in.</p>
188 </div></div>
189 <div class="bottomlang">
190 <p><span>Available Languages: </span><a href="../en/programs/dbmmanage.html" title="English">&nbsp;en&nbsp;</a> |
191 <a href="../ko/programs/dbmmanage.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
192 <a href="../tr/programs/dbmmanage.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
193 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
194 <script type="text/javascript"><!--//--><![CDATA[//><!--
195 var comments_shortname = 'httpd';
196 var comments_identifier = 'http://httpd.apache.org/docs/trunk/programs/dbmmanage.html';
197 (function(w, d) {
198     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
199         d.write('<div id="comments_thread"><\/div>');
200         var s = d.createElement('script');
201         s.type = 'text/javascript';
202         s.async = true;
203         s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
204         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
205     }
206     else {
207         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
208     }
209 })(window, document);
210 //--><!]]></script></div><div id="footer">
211 <p class="apache">Copyright 2012 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
212 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
213 if (typeof(prettyPrint) !== 'undefined') {
214     prettyPrint();
215 }
216 //--><!]]></script>
217 </body></html>