home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / apache_2.2.8-win32-x86-no_ssl.msi / Data1.cab / _942E073E570A54B5EDD90D3838C8F44F < prev    next >
Extensible Markup Language  |  2007-09-01  |  15KB  |  281 lines

  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>htdbm - Manipulate DBM password databases - 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" />
  12. <link href="../images/favicon.ico" rel="shortcut icon" /></head>
  13. <body id="manual-page"><div id="page-header">
  14. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
  15. <p class="apache">Apache HTTP Server Version 2.2</p>
  16. <img alt="" src="../images/feather.gif" /></div>
  17. <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
  18. <div id="path">
  19. <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.2</a> > <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>htdbm - Manipulate DBM password databases</h1>
  20. <div class="toplang">
  21. <p><span>Available Languages: </span><a href="../en/programs/htdbm.html" title="English"> en </a></p>
  22. </div>
  23.  
  24.     <p><code>htdbm</code> is used to manipulate the DBM format files used to
  25.     store usernames and password for basic authentication of HTTP users via
  26.     <code class="module"><a href="../mod/mod_auth_dbm.html">mod_auth_dbm</a></code>.  See the <code class="program"><a href="../programs/dbmmanage.html">dbmmanage</a></code>
  27.     documentation for more information about these DBM files.</p>
  28. </div>
  29. <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#synopsis">Synopsis</a></li>
  30. <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
  31. <li><img alt="" src="../images/down.gif" /> <a href="#bugs">Bugs</a></li>
  32. <li><img alt="" src="../images/down.gif" /> <a href="#exit">Exit Status</a></li>
  33. <li><img alt="" src="../images/down.gif" /> <a href="#examples">Examples</a></li>
  34. <li><img alt="" src="../images/down.gif" /> <a href="#security">Security Considerations</a></li>
  35. <li><img alt="" src="../images/down.gif" /> <a href="#restrictions">Restrictions</a></li>
  36. </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_auth_dbm.html">mod_auth_dbm</a></code></li></ul></div>
  37. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  38. <div class="section">
  39. <h2><a name="synopsis" id="synopsis">Synopsis</a></h2>
  40.     <p><code><strong>htdbm</strong>
  41.     [ -<strong>T</strong><var>DBTYPE</var> ]
  42.     [ -<strong>c</strong> ]
  43.     [ -<strong>m</strong> |
  44.       -<strong>d</strong> |
  45.       -<strong>p</strong> |
  46.       -<strong>s</strong> ]
  47.     [ -<strong>t</strong> ]
  48.     [ -<strong>v</strong> ]
  49.     [ -<strong>x</strong> ]
  50.     <var>filename</var> <var>username</var></code></p>
  51.  
  52.     <p><code><strong>htdbm</strong> -<strong>b</strong>
  53.     [ -<strong>T</strong><var>DBTYPE</var> ]
  54.     [ -<strong>c</strong> ]
  55.     [ -<strong>m</strong> |
  56.       -<strong>d</strong> |
  57.       -<strong>p</strong> |
  58.       -<strong>s</strong> ]
  59.     [ -<strong>t</strong> ]
  60.     [ -<strong>v</strong> ]
  61.     <var>filename</var> <var>username</var> <var>password</var></code></p>
  62.  
  63.     <p><code><strong>htdbm</strong> -<strong>n</strong>
  64.     [ -<strong>c</strong> ]
  65.     [ -<strong>m</strong> |
  66.       -<strong>d</strong> |
  67.       -<strong>p</strong> |
  68.       -<strong>s</strong> ]
  69.     [ -<strong>t</strong> ]
  70.     [ -<strong>v</strong> ]
  71.     <var>username</var></code></p>
  72.  
  73.     <p><code><strong>htdbm</strong> -<strong>nb</strong>
  74.     [ -<strong>c</strong> ]
  75.     [ -<strong>m</strong> |
  76.       -<strong>d</strong> |
  77.       -<strong>p</strong> |
  78.       -<strong>s</strong> ]
  79.     [ -<strong>t</strong> ]
  80.     [ -<strong>v</strong> ]
  81.     <var>username</var> <var>password</var></code></p>
  82.  
  83.     <p><code><strong>htdbm</strong> -<strong>v</strong>
  84.     [ -<strong>T</strong><var>DBTYPE</var> ]
  85.     [ -<strong>c</strong> ]
  86.     [ -<strong>m</strong> |
  87.       -<strong>d</strong> |
  88.       -<strong>p</strong> |
  89.       -<strong>s</strong> ]
  90.     [ -<strong>t</strong> ]
  91.     [ -<strong>v</strong> ]
  92.     <var>filename</var> <var>username</var></code></p>
  93.  
  94.     <p><code><strong>htdbm</strong> -<strong>vb</strong>
  95.     [ -<strong>T</strong><var>DBTYPE</var> ]
  96.     [ -<strong>c</strong> ]
  97.     [ -<strong>m</strong> |
  98.       -<strong>d</strong> |
  99.       -<strong>p</strong> |
  100.       -<strong>s</strong> ]
  101.     [ -<strong>t</strong> ]
  102.     [ -<strong>v</strong> ]
  103.     <var>filename</var> <var>username</var> <var>password</var></code></p>
  104.  
  105.     <p><code><strong>htdbm</strong> -<strong>x</strong>
  106.     [ -<strong>T</strong><var>DBTYPE</var> ]
  107.     [ -<strong>m</strong> |
  108.       -<strong>d</strong> |
  109.       -<strong>p</strong> |
  110.       -<strong>s</strong> ]
  111.     <var>filename</var> <var>username</var></code></p>
  112.  
  113.     <p><code><strong>htdbm</strong> -<strong>l</strong>
  114.     [ -<strong>T</strong><var>DBTYPE</var> ]
  115.     </code></p>
  116. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  117. <div class="section">
  118. <h2><a name="options" id="options">Options</a></h2>
  119.     <dl>
  120.     <dt><code>-b</code></dt>
  121.     <dd>Use batch mode; <em>i.e.</em>, get the password from the command line
  122.     rather than prompting for it. This option should be used with extreme care,
  123.     since <strong>the password is clearly visible</strong> on the command
  124.     line.</dd>
  125.  
  126.     <dt><code>-c</code></dt>
  127.     <dd>Create the <var>passwdfile</var>. If <var>passwdfile</var> already
  128.     exists, it is rewritten and truncated. This option cannot be combined with
  129.     the <code>-n</code> option.</dd>
  130.  
  131.     <dt><code>-n</code></dt>
  132.     <dd>Display the results on standard output rather than updating a
  133.     database.  This option changes the syntax of the command line, since the
  134.     <var>passwdfile</var> argument (usually the first one) is omitted. It
  135.     cannot be combined with the <code>-c</code> option.</dd>
  136.  
  137.     <dt><code>-m</code></dt>
  138.     <dd>Use MD5 encryption for passwords. On Windows, Netware and TPF, this is
  139.     the default.</dd>
  140.  
  141.     <dt><code>-d</code></dt>
  142.     <dd>Use <code>crypt()</code> encryption for passwords. The default on all
  143.     platforms but Windows, Netware and TPF. Though possibly supported by
  144.     <code>htdbm</code> on all platforms, it is not supported by the
  145.     <code class="program"><a href="../programs/httpd.html">httpd</a></code> server on Windows, Netware and TPF.</dd>
  146.  
  147.     <dt><code>-s</code></dt>
  148.     <dd>Use SHA encryption for passwords. Facilitates migration from/to Netscape
  149.     servers using the LDAP Directory Interchange Format (ldif).</dd>
  150.  
  151.     <dt><code>-p</code></dt>
  152.     <dd>Use plaintext passwords. Though <code>htdbm</code> will support
  153.     creation on all platforms, the <code class="program"><a href="../programs/httpd.html">httpd</a></code> daemon will
  154.     only accept plain text passwords on Windows, Netware and TPF.</dd>
  155.  
  156.     <dt><code>-l</code></dt>
  157.     <dd>Print each of the usernames and comments from the database on
  158.     stdout.</dd>
  159.  
  160.     <dt><code>-t</code></dt>
  161.     <dd>Interpret the final parameter as a comment.  When this option is
  162.     specified, an additional string can be appended to the command line; this
  163.     string will be stored in the "Comment" field of the database, associated
  164.     with the specified username.</dd>
  165.  
  166.     <dt><code>-v</code></dt>
  167.     <dd>Verify the username and password.  The program will print a message
  168.     indicating whether the supplied password is valid.  If the password is
  169.     invalid, the program exits with error code 3.</dd>
  170.  
  171.     <dt><code>-x</code></dt>
  172.     <dd>Delete user. If the username exists in the specified DBM file, it
  173.     will be deleted.</dd>
  174.  
  175.     <dt><code><var>filename</var></code></dt>
  176.     <dd>The filename of the DBM format file. Usually without the extension
  177.     <code>.db</code>, <code>.pag</code>, or <code>.dir</code>.  If
  178.     <code>-c</code> is given, the DBM file is created if it does not already
  179.     exist, or updated if it does exist.</dd>
  180.  
  181.     <dt><code><var>username</var></code></dt>
  182.     <dd>The username to create or update in <var>passwdfile</var>. If
  183.     <var>username</var> does not exist in this file, an entry is added. If it
  184.     does exist, the password is changed.</dd>
  185.  
  186.     <dt><code><var>password</var></code></dt>
  187.     <dd>The plaintext password to be encrypted and stored in the DBM file.
  188.     Used only with the <code>-b</code> flag.</dd>
  189.  
  190.     <dt><code>-T<var>DBTYPE</var></code></dt>
  191.     <dd>Type of DBM file (SDBM, GDBM, DB, or "default").</dd>
  192.     </dl>
  193. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  194. <div class="section">
  195. <h2><a name="bugs" id="bugs">Bugs</a></h2>
  196.     <p>One should be aware that there are a number of different DBM file
  197.     formats in existence, and with all likelihood, libraries for more than
  198.     one format may exist on your system. The three primary examples are
  199.     SDBM, NDBM, GNU GDBM, and Berkeley/Sleepycat DB 2/3/4. Unfortunately,
  200.     all these libraries use different file formats, and you must make sure
  201.     that the file format used by <var>filename</var> is the same format that
  202.     <code>htdbm</code> expects to see. <code>htdbm</code> currently has
  203.     no way of determining what type of DBM file it is looking at. If used
  204.     against the wrong format, will simply return nothing, or may create a
  205.     different DBM file with a different name, or at worst, it may corrupt
  206.     the DBM file if you were attempting to write to it.</p>
  207.  
  208.     <p>One can usually use the <code>file</code> program supplied with most
  209.     Unix systems to see what format a DBM file is in.</p>
  210. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  211. <div class="section">
  212. <h2><a name="exit" id="exit">Exit Status</a></h2>
  213.     <p><code>htdbm</code> returns a zero status ("true") if the username and
  214.     password have been successfully added or updated in the DBM File.
  215.     <code>htdbm</code> returns <code>1</code> if it encounters some problem
  216.     accessing files, <code>2</code> if there was a syntax problem with the
  217.     command line, <code>3</code> if the password was entered interactively and
  218.     the verification entry didn't match, <code>4</code> if its operation was
  219.     interrupted, <code>5</code> if a value is too long (username, filename,
  220.     password, or final computed record), <code>6</code> if the username
  221.     contains illegal characters (see the <a href="#restrictions">Restrictions
  222.     section</a>), and <code>7</code> if the file is not a valid DBM password
  223.     file.</p>
  224. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  225. <div class="section">
  226. <h2><a name="examples" id="examples">Examples</a></h2>
  227.     <div class="example"><p><code>
  228.       htdbm /usr/local/etc/apache/.htdbm-users jsmith
  229.     </code></p></div>
  230.  
  231.     <p>Adds or modifies the password for user <code>jsmith</code>. The user
  232.     is prompted for the password. If executed on a Windows system, the password
  233.     will be encrypted using the  modified Apache MD5 algorithm; otherwise, the
  234.     system's <code>crypt()</code> routine will be used. If the file does not
  235.     exist, <code>htdbm</code> will do nothing except return an error.</p>
  236.  
  237.     <div class="example"><p><code>
  238.       htdbm -c /home/doe/public_html/.htdbm jane
  239.     </code></p></div>
  240.  
  241.     <p>Creates a new file and stores a record in it for user <code>jane</code>.
  242.     The user is prompted for the password. If the file exists and cannot be
  243.     read, or cannot be written, it is not altered and <code>htdbm</code>
  244.     will display a message and return an error status.</p>
  245.  
  246.     <div class="example"><p><code>
  247.       htdbm -mb /usr/web/.htdbm-all jones Pwd4Steve
  248.     </code></p></div>
  249.  
  250.     <p>Encrypts the password from the command line (<code>Pwd4Steve</code>)
  251.     using the MD5 algorithm, and stores it in the specified file.</p>
  252. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  253. <div class="section">
  254. <h2><a name="security" id="security">Security Considerations</a></h2>
  255.     <p>Web password files such as those managed by <code>htdbm</code> should
  256.     <em>not</em> be within the Web server's URI space -- that is, they should
  257.     not be fetchable with a browser.</p>
  258.  
  259.     <p>The use of the <code>-b</code> option is discouraged, since when it is
  260.     used the unencrypted password appears on the command line.</p>
  261. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  262. <div class="section">
  263. <h2><a name="restrictions" id="restrictions">Restrictions</a></h2>
  264.     <p>On the Windows and MPE platforms, passwords encrypted with
  265.     <code>htdbm</code> are limited to no more than <code>255</code>
  266.     characters in length. Longer passwords will be truncated to 255
  267.     characters.</p>
  268.  
  269.     <p>The MD5 algorithm used by <code>htdbm</code> is specific to the Apache
  270.     software; passwords encrypted using it will not be usable with other Web
  271.     servers.</p>
  272.  
  273.     <p>Usernames are limited to <code>255</code> bytes and may not include the
  274.     character <code>:</code>.</p>
  275. </div></div>
  276. <div class="bottomlang">
  277. <p><span>Available Languages: </span><a href="../en/programs/htdbm.html" title="English"> en </a></p>
  278. </div><div id="footer">
  279. <p class="apache">Copyright 2007 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>
  280. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
  281. </body></html>