8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<?xml version="1.0" encoding="ISO-8859-1"?>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<!--
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl This file is generated from xml source: DO NOT EDIT
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl -->
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc<title>htdbm - Manipulate DBM password databases - Apache HTTP Server Version 2.5</title>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<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" />
2e545ce2450a9953665f701bb05350f0d3f26275nd<script src="/style/scripts/prettify.min.js" type="text/javascript">
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen</script>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<link href="/images/favicon.ico" rel="shortcut icon" /></head>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<body id="manual-page"><div id="page-header">
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.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>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<p class="apache">Apache HTTP Server Version 2.5</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<img alt="" src="/images/feather.gif" /></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div id="path">
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<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>htdbm - Manipulate DBM password databases</h1>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="toplang">
0cf3cdbaa1dad11cbf1ce32e48f1b4ec88cf779fnilgun<p><span>Available Languages: </span><a href="/en/programs/htdbm.html" title="English">&nbsp;en&nbsp;</a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/tr/programs/htdbm.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl</div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p><code>htdbm</code> is used to manipulate the DBM format files used to
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl store usernames and password for basic authentication of HTTP users via
4a3f85b165e7ece75cfbdb5e0c5d272edd036c32rpluem <code class="module"><a href="/mod/mod_authn_dbm.html">mod_authn_dbm</a></code>. See the <code class="program"><a href="/programs/dbmmanage.html">dbmmanage</a></code>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl documentation for more information about these DBM files.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl</div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#synopsis">Synopsis</a></li>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<li><img alt="" src="/images/down.gif" /> <a href="#options">Options</a></li>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<li><img alt="" src="/images/down.gif" /> <a href="#bugs">Bugs</a></li>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<li><img alt="" src="/images/down.gif" /> <a href="#exit">Exit Status</a></li>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<li><img alt="" src="/images/down.gif" /> <a href="#examples">Examples</a></li>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<li><img alt="" src="/images/down.gif" /> <a href="#security">Security Considerations</a></li>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<li><img alt="" src="/images/down.gif" /> <a href="#restrictions">Restrictions</a></li>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh</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/dbmmanage.html">dbmmanage</a></code></li><li><code class="module"><a href="/mod/mod_authn_dbm.html">mod_authn_dbm</a></code></li></ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="section">
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<h2><a name="synopsis" id="synopsis">Synopsis</a></h2>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p><code><strong>htdbm</strong>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>T</strong><var>DBTYPE</var> ]
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung [ -<strong>i</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>c</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>m</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>B</strong> |
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl -<strong>d</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>s</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>p</strong> ]
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung [ -<strong>C</strong> <var>cost</var> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>t</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>v</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <var>filename</var> <var>username</var></code></p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p><code><strong>htdbm</strong> -<strong>b</strong>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>T</strong><var>DBTYPE</var> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>c</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>m</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>B</strong> |
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl -<strong>d</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>s</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>p</strong> ]
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung [ -<strong>C</strong> <var>cost</var> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>t</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>v</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <var>filename</var> <var>username</var> <var>password</var></code></p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p><code><strong>htdbm</strong> -<strong>n</strong>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung [ -<strong>i</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>c</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>m</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>B</strong> |
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl -<strong>d</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>s</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>p</strong> ]
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung [ -<strong>C</strong> <var>cost</var> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>t</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>v</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <var>username</var></code></p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p><code><strong>htdbm</strong> -<strong>nb</strong>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>c</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>m</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>B</strong> |
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl -<strong>d</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>s</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>p</strong> ]
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung [ -<strong>C</strong> <var>cost</var> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>t</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>v</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <var>username</var> <var>password</var></code></p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p><code><strong>htdbm</strong> -<strong>v</strong>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>T</strong><var>DBTYPE</var> ]
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung [ -<strong>i</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>c</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>m</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>B</strong> |
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl -<strong>d</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>s</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>p</strong> ]
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung [ -<strong>C</strong> <var>cost</var> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>t</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>v</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <var>filename</var> <var>username</var></code></p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p><code><strong>htdbm</strong> -<strong>vb</strong>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>T</strong><var>DBTYPE</var> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>c</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>m</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>B</strong> |
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl -<strong>d</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>s</strong> |
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung -<strong>p</strong> ]
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung [ -<strong>C</strong> <var>cost</var> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>t</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>v</strong> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <var>filename</var> <var>username</var> <var>password</var></code></p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p><code><strong>htdbm</strong> -<strong>x</strong>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>T</strong><var>DBTYPE</var> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <var>filename</var> <var>username</var></code></p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p><code><strong>htdbm</strong> -<strong>l</strong>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl [ -<strong>T</strong><var>DBTYPE</var> ]
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl </code></p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="section">
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<h2><a name="options" id="options">Options</a></h2>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dl>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-b</code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>Use batch mode; <em>i.e.</em>, get the password from the command line
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl rather than prompting for it. This option should be used with extreme care,
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl since <strong>the password is clearly visible</strong> on the command
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung line. For script use see the <code>-i</code> option.</dd>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <dt><code>-i</code></dt>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <dd>Read the password from stdin without verification (for script usage).</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-c</code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>Create the <var>passwdfile</var>. If <var>passwdfile</var> already
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl exists, it is rewritten and truncated. This option cannot be combined with
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl the <code>-n</code> option.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-n</code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>Display the results on standard output rather than updating a
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl database. This option changes the syntax of the command line, since the
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <var>passwdfile</var> argument (usually the first one) is omitted. It
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl cannot be combined with the <code>-c</code> option.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-m</code></dt>
166c7891cc2a7545eca0f4dda6af92026bc43fcfrpluem <dd>Use MD5 encryption for passwords. On Windows and Netware, this is
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl the default.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <dt><code>-B</code></dt>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <dd>Use bcrypt encryption for passwords. This is currently considered to
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung be very secure.</dd>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <dt><code>-C</code></dt>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <dd>This flag is only allowed in combination with <code>-B</code> (bcrypt
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung encryption). It sets the computing time used for the bcrypt algorithm
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung (higher is more secure but slower, default: 5, valid: 4 to 31).</dd>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-d</code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>Use <code>crypt()</code> encryption for passwords. The default on all
166c7891cc2a7545eca0f4dda6af92026bc43fcfrpluem platforms but Windows and Netware. Though possibly supported by
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <code>htdbm</code> on all platforms, it is not supported by the
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <code class="program"><a href="/programs/httpd.html">httpd</a></code> server on Windows and Netware.
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung This algorithm is <strong>insecure</strong> by today's standards.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-s</code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>Use SHA encryption for passwords. Facilitates migration from/to Netscape
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung servers using the LDAP Directory Interchange Format (ldif).
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung This algorithm is <strong>insecure</strong> by today's standards.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-p</code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>Use plaintext passwords. Though <code>htdbm</code> will support
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl creation on all platforms, the <code class="program"><a href="/programs/httpd.html">httpd</a></code> daemon will
166c7891cc2a7545eca0f4dda6af92026bc43fcfrpluem only accept plain text passwords on Windows and Netware.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-l</code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>Print each of the usernames and comments from the database on
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl stdout.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-v</code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>Verify the username and password. The program will print a message
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl indicating whether the supplied password is valid. If the password is
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl invalid, the program exits with error code 3.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-x</code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>Delete user. If the username exists in the specified DBM file, it
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl will be deleted.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <dt><code>-t</code></dt>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <dd>Interpret the final parameter as a comment. When this option is
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung specified, an additional string can be appended to the command line; this
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung string will be stored in the "Comment" field of the database, associated
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung with the specified username.</dd>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code><var>filename</var></code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>The filename of the DBM format file. Usually without the extension
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <code>.db</code>, <code>.pag</code>, or <code>.dir</code>. If
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <code>-c</code> is given, the DBM file is created if it does not already
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl exist, or updated if it does exist.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code><var>username</var></code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>The username to create or update in <var>passwdfile</var>. If
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <var>username</var> does not exist in this file, an entry is added. If it
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl does exist, the password is changed.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code><var>password</var></code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>The plaintext password to be encrypted and stored in the DBM file.
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl Used only with the <code>-b</code> flag.</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dt><code>-T<var>DBTYPE</var></code></dt>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <dd>Type of DBM file (SDBM, GDBM, DB, or "default").</dd>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl </dl>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="section">
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<h2><a name="bugs" id="bugs">Bugs</a></h2>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p>One should be aware that there are a number of different DBM file
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl formats in existence, and with all likelihood, libraries for more than
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl one format may exist on your system. The three primary examples are
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl SDBM, NDBM, GNU GDBM, and Berkeley/Sleepycat DB 2/3/4. Unfortunately,
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl all these libraries use different file formats, and you must make sure
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl that the file format used by <var>filename</var> is the same format that
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <code>htdbm</code> expects to see. <code>htdbm</code> currently has
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl no way of determining what type of DBM file it is looking at. If used
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl against the wrong format, will simply return nothing, or may create a
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl different DBM file with a different name, or at worst, it may corrupt
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl the DBM file if you were attempting to write to it.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p>One can usually use the <code>file</code> program supplied with most
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl Unix systems to see what format a DBM file is in.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="section">
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<h2><a name="exit" id="exit">Exit Status</a></h2>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p><code>htdbm</code> returns a zero status ("true") if the username and
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl password have been successfully added or updated in the DBM File.
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <code>htdbm</code> returns <code>1</code> if it encounters some problem
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl accessing files, <code>2</code> if there was a syntax problem with the
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl command line, <code>3</code> if the password was entered interactively and
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl the verification entry didn't match, <code>4</code> if its operation was
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl interrupted, <code>5</code> if a value is too long (username, filename,
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl password, or final computed record), <code>6</code> if the username
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl contains illegal characters (see the <a href="#restrictions">Restrictions
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl section</a>), and <code>7</code> if the file is not a valid DBM password
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl file.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="section">
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<h2><a name="examples" id="examples">Examples</a></h2>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <div class="example"><p><code>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl htdbm /usr/local/etc/apache/.htdbm-users jsmith
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl </code></p></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p>Adds or modifies the password for user <code>jsmith</code>. The user
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl is prompted for the password. If executed on a Windows system, the password
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl will be encrypted using the modified Apache MD5 algorithm; otherwise, the
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl system's <code>crypt()</code> routine will be used. If the file does not
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl exist, <code>htdbm</code> will do nothing except return an error.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <div class="example"><p><code>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl htdbm -c /home/doe/public_html/.htdbm jane
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl </code></p></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p>Creates a new file and stores a record in it for user <code>jane</code>.
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl The user is prompted for the password. If the file exists and cannot be
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl read, or cannot be written, it is not altered and <code>htdbm</code>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl will display a message and return an error status.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <div class="example"><p><code>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl htdbm -mb /usr/web/.htdbm-all jones Pwd4Steve
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl </code></p></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p>Encrypts the password from the command line (<code>Pwd4Steve</code>)
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl using the MD5 algorithm, and stores it in the specified file.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="section">
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<h2><a name="security" id="security">Security Considerations</a></h2>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p>Web password files such as those managed by <code>htdbm</code> should
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <em>not</em> be within the Web server's URI space -- that is, they should
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl not be fetchable with a browser.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p>The use of the <code>-b</code> option is discouraged, since when it is
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl used the unencrypted password appears on the command line.</p>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <p>When using the <code>crypt()</code> algorithm, note that only the first
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung 8 characters of the password are used to form the password. If the supplied
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung password is longer, the extra characters will be silently discarded.</p>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <p>The SHA encryption format does not use salting: for a given password,
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung there is only one encrypted representation. The <code>crypt()</code> and
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung MD5 formats permute the representation by prepending a random salt string,
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung to make dictionary attacks against the passwords more difficult.</p>
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung <p>The SHA and <code>crypt()</code> formats are insecure by today's
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung standards.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="section">
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<h2><a name="restrictions" id="restrictions">Restrictions</a></h2>
166c7891cc2a7545eca0f4dda6af92026bc43fcfrpluem <p>On the Windows platform, passwords encrypted with
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <code>htdbm</code> are limited to no more than <code>255</code>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl characters in length. Longer passwords will be truncated to 255
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl characters.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p>The MD5 algorithm used by <code>htdbm</code> is specific to the Apache
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl software; passwords encrypted using it will not be usable with other Web
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl servers.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl <p>Usernames are limited to <code>255</code> bytes and may not include the
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl character <code>:</code>.</p>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl</div></div>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl<div class="bottomlang">
0cf3cdbaa1dad11cbf1ce32e48f1b4ec88cf779fnilgun<p><span>Available Languages: </span><a href="/en/programs/htdbm.html" title="English">&nbsp;en&nbsp;</a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/tr/programs/htdbm.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
727872d18412fc021f03969b8641810d8896820bhumbedooh</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>
0d0ba3a410038e179b695446bb149cce6264e0abnd<script type="text/javascript"><!--//--><![CDATA[//><!--
727872d18412fc021f03969b8641810d8896820bhumbedoohvar comments_shortname = 'httpd';
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohvar comments_identifier = 'http://httpd.apache.org/docs/trunk/programs/htdbm.html';
0d0ba3a410038e179b695446bb149cce6264e0abnd(function(w, d) {
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
727872d18412fc021f03969b8641810d8896820bhumbedooh d.write('<div id="comments_thread"><\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd var s = d.createElement('script');
0d0ba3a410038e179b695446bb149cce6264e0abnd s.type = 'text/javascript';
0d0ba3a410038e179b695446bb149cce6264e0abnd s.async = true;
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
0d0ba3a410038e179b695446bb149cce6264e0abnd (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
0d0ba3a410038e179b695446bb149cce6264e0abnd }
0d0ba3a410038e179b695446bb149cce6264e0abnd else {
727872d18412fc021f03969b8641810d8896820bhumbedooh d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd }
0d0ba3a410038e179b695446bb149cce6264e0abnd})(window, document);
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh//--><!]]></script></div><div id="footer">
205f749042ed530040a4f0080dbcb47ceae8a374rjung<p class="apache">Copyright 2015 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>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.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[//><!--
0d0ba3a410038e179b695446bb149cce6264e0abndif (typeof(prettyPrint) !== 'undefined') {
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd prettyPrint();
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd}
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd//--><!]]></script>
8a5db6a3d29e28627bf8a6d6f7066e840da6bdf2jsl</body></html>