<!DOCTYPE html SYSTEM "about:legacy-compat">
<html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<!--
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
              This file is generated from xml source: DO NOT EDIT
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      -->
<title>dbmmanage - Manage user authentication files in DBM format - Apache HTTP Server Version 2.4</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 rel="stylesheet" type="text/css" href="../style/css/prettify.css">
<script src="../style/scripts/prettify.min.js">
</script>

<link href="../images/favicon.png" rel="shortcut icon"></head>
<body id="manual-page"><div id="page-header">
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="https://cwiki.apache.org/confluence/display/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a> | <a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2">Report a bug</a></p>
<p class="apache">Apache HTTP Server Version 2.4</p>
<img alt="" src="../images/feather.png"></div>
<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif"></a></div>
<div id="path">
<a href="https://www.apache.org/">Apache</a> &gt; <a href="https://httpd.apache.org/">HTTP Server</a> &gt; <a href="https://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>dbmmanage - Manage user authentication files in DBM format</h1>
<button aria-label="Toggle language list" class="lang-toggle"><svg xmlns="http://www.w3.org/2000/svg" stroke-width="2" stroke="currentColor" fill="none" viewBox="0 0 24 24" height="16" width="16"><circle r="10" cy="12" cx="12"/><line y2="12" x2="22" y1="12" x1="2"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg></button>
<div class="toplang">
<p><span>Available Languages: </span><a href="../en/programs/dbmmanage.html" title="English">&nbsp;en&nbsp;</a> |
<a href="../fr/programs/dbmmanage.html" hreflang="fr" rel="alternate" title="Fran&ccedil;ais">&nbsp;fr&nbsp;</a> |
<a href="../ko/programs/dbmmanage.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
<a href="../tr/programs/dbmmanage.html" hreflang="tr" rel="alternate" title="T&uuml;rk&ccedil;e">&nbsp;tr&nbsp;</a></p>
</div>

    <p><code>dbmmanage</code> is used to create and update the DBM format files
    used to store usernames and password for basic authentication of HTTP users
    via <code class="module"><a href="../mod/mod_authn_dbm.html">mod_authn_dbm</a></code>.
    Resources available from the Apache HTTP server can be restricted to just
    the users listed in the files created by <code>dbmmanage</code>. This
    program can only be used when the usernames are stored in a DBM file. To
    use a flat-file database see <code class="program"><a href="../programs/htpasswd.html">htpasswd</a></code>.</p>

    <p>Another tool to maintain a DBM password database is
    <code class="program"><a href="../programs/htdbm.html">htdbm</a></code>.</p>

    <p>This manual page only lists the command line arguments. For details of
    the directives necessary to configure user authentication in
    <code class="program"><a href="../programs/httpd.html">httpd</a></code> see the httpd manual, which is part of
    the Apache distribution or can be found at <a href="http://httpd.apache.org/">http://httpd.apache.org/</a>.</p>
</div>
<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif"> <a href="#synopsis">Synopsis</a></li>
<li><img alt="" src="../images/down.gif"> <a href="#options">Options</a></li>
<li><img alt="" src="../images/down.gif"> <a href="#bugs">Bugs</a></li>
</ul><h3>See also</h3><ul class="seealso"><li><code class="program"><a href="../programs/httpd.html">httpd</a></code></li><li><code class="program"><a href="../programs/htdbm.html">htdbm</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></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"></a></div>
<div class="section">
<h2 id="synopsis">Synopsis <a title="Permanent link" href="#synopsis" class="permalink">&para;</a></h2>
    <p><code><strong>dbmmanage</strong> [ <var>encoding</var> ]
    <var>filename</var> add|adduser|check|delete|update
    <var>username</var>
    [ <var>encpasswd</var>
      [ <var>group</var>[,<var>group</var>...]
        [ <var>comment</var> ] ] ]</code></p>

    <p><code><strong>dbmmanage</strong> <var>filename</var>
    view [ <var>username</var> ]</code></p>

    <p><code><strong>dbmmanage</strong> <var>filename</var> import</code></p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"></a></div>
<div class="section">
<h2 id="options">Options <a title="Permanent link" href="#options" class="permalink">&para;</a></h2>
    <dl>
    <dt><code><var>filename</var></code></dt>
    <dd>The filename of the DBM format file. Usually without the extension
    <code>.db</code>, <code>.pag</code>, or <code>.dir</code>.</dd>

    <dt><code><var>username</var></code></dt>
    <dd>The user for which the operations are performed. The <var>username</var>
    may not contain a colon (<code>:</code>).</dd>

    <dt><code><var>encpasswd</var></code></dt>
    <dd>This is the already hashed password to use for the
    <code>update</code> and <code>add</code> commands. You may use a hyphen
    (<code>-</code>) if you want to get prompted for the password, but fill
    in the fields afterwards. Additionally when using the <code>update</code>
    command, a period (<code>.</code>) keeps the original password
    untouched.</dd>

    <dt><code><var>group</var></code></dt>
    <dd>A group, which the user is member of. A groupname may not contain a
    colon (<code>:</code>). You may use a hyphen (<code>-</code>) if you don't
    want to assign the user to a group, but fill in the comment field.
    Additionally when using the <code>update</code> command, a period
    (<code>.</code>) keeps the original groups untouched.</dd>

    <dt><code><var>comment</var></code></dt>
    <dd>This is the place for your opaque comments about the user, like
    realname, mailaddress or such things. The server will ignore this
    field.</dd>
    </dl>

    <h3 id="options.encodings">Encodings</h3>
      <dl>
      <dt><code>-d</code></dt>
      <dd>crypt hashing (default, except on Win32, Netware)</dd>

      <dt><code>-m</code></dt>
      <dd>MD5 hashing (default on Win32, Netware)</dd>

      <dt><code>-s</code></dt>
      <dd>SHA1 hashing</dd>

      <dt><code>-p</code></dt>
      <dd>plaintext (<em>not recommended</em>)</dd>
      </dl>
    

    <h3 id="options.commands">Commands</h3>
      <dl>
      <dt><code>add</code></dt>
      <dd>Adds an entry for <var>username</var> to <var>filename</var> using the
      hashed password <var>encpasswd</var>.

      <div class="example"><p><code>dbmmanage passwords.dat add rbowen foKntnEF3KSXA</code></p></div>
      </dd>

      <dt><code>adduser</code></dt>
      <dd>Asks for a password and then adds an entry for <var>username</var> to
      <var>filename</var>.

      <div class="example"><p><code>dbmmanage passwords.dat adduser krietz</code></p></div>
      </dd>

      <dt><code>check</code></dt>
      <dd>Asks for a password and then checks if <var>username</var> is in
      <var>filename</var> and if it's password matches the specified one.

      <div class="example"><p><code>dbmmanage passwords.dat check rbowen</code></p></div>
      </dd>

      <dt><code>delete</code></dt>
      <dd>Deletes the <var>username</var> entry from <var>filename</var>.

      <div class="example"><p><code>dbmmanage passwords.dat delete rbowen</code></p></div>
      </dd>

      <dt><code>import</code></dt>
      <dd>Reads <code><var>username</var>:<var>password</var></code> entries
      (one per line) from <code>STDIN</code> and adds them to
      <var>filename</var>. The passwords already have to be crypted.</dd>

      <dt><code>update</code></dt>
      <dd>Same as the <code>adduser</code> command, except that it makes
      sure <var>username</var> already exists in <var>filename</var>.

      <div class="example"><p><code>dbmmanage passwords.dat update rbowen</code></p></div>
      </dd>

      <dt><code>view</code></dt>
      <dd>Just displays the contents of the DBM file. If you specify a
      <var>username</var>, it displays the particular record only.

      <div class="example"><p><code>dbmmanage passwords.dat view</code></p></div>
      </dd>
      </dl>
    
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"></a></div>
<div class="section">
<h2 id="bugs">Bugs <a title="Permanent link" href="#bugs" class="permalink">&para;</a></h2>
    <p>One should be aware that there are a number of different DBM file formats
    in existence, and with all likelihood, libraries for more than one format
    may exist on your system. The three primary examples are SDBM, NDBM, the GNU
    project's GDBM, and Berkeley DB 2. Unfortunately, all these libraries use
    different file formats, and you must make sure that the file format used
    by <var>filename</var> is the same format that <code>dbmmanage</code>
    expects to see. <code>dbmmanage</code> currently has no way of determining
    what type of DBM file it is looking at. If used against the wrong format,
    will simply return nothing, or may create a different DBM file with a
    different name, or at worst, it may corrupt the DBM file if you were
    attempting to write to it.</p>

    <p><code>dbmmanage</code> has a list of DBM format preferences, defined by
    the <code>@AnyDBM::ISA</code> array near the beginning of the program. Since
    we prefer the Berkeley DB 2 file format, the order in which
    <code>dbmmanage</code> will look for system libraries is Berkeley DB 2,
    then NDBM, then GDBM and then SDBM. The first library found will be the
    library <code>dbmmanage</code> will attempt to use for all DBM file
    transactions. This ordering is slightly  different than the standard
    <code>@AnyDBM::ISA</code> ordering in Perl, as well as the ordering used by
    the simple <code>dbmopen()</code> call in Perl, so if you use any other
    utilities to manage your DBM files, they must also follow this preference
    ordering. Similar care must be taken if using programs in other languages,
    like C, to access these files.</p>

    <p>One can usually use the <code>file</code> program supplied with most
    Unix systems to see what format a DBM file is in.</p>
</div></div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/programs/dbmmanage.html" title="English">&nbsp;en&nbsp;</a> |
<a href="../fr/programs/dbmmanage.html" hreflang="fr" rel="alternate" title="Fran&ccedil;ais">&nbsp;fr&nbsp;</a> |
<a href="../ko/programs/dbmmanage.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
<a href="../tr/programs/dbmmanage.html" hreflang="tr" rel="alternate" title="T&uuml;rk&ccedil;e">&nbsp;tr&nbsp;</a></p>
</div><div id="footer">
<p class="apache">Copyright 2026 The Apache Software Foundation.<br>Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="https://cwiki.apache.org/confluence/display/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a> | <a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2">Report a bug</a></p></div><script><!--//--><![CDATA[//><!--
if (typeof(prettyPrint) !== 'undefined') {
    prettyPrint();
}
var langToggle = document.querySelector('.lang-toggle');
var topLang = document.querySelector('.toplang');
if (langToggle && topLang) {
    langToggle.addEventListener('click', function() { topLang.classList.toggle('open'); });
}
var qv = document.getElementById('quickview');
if (qv) {
    document.body.appendChild(qv);
    var qvBtn = document.createElement('button');
    qvBtn.className = 'qv-toggle';
    qvBtn.setAttribute('aria-label', 'Toggle page navigation');
    qvBtn.innerHTML = '&#9776;';
    document.body.appendChild(qvBtn);
    qvBtn.addEventListener('click', function() {
        var isOpen = qv.classList.toggle('open');
        if (isOpen) {
            qv.style.top = window.scrollY + 10 + 'px';
        }
    });
    window.addEventListener('scroll', function() { qv.classList.remove('open'); });
}
//--><!]]></script>
</body></html>