htpasswd.html.en revision a6eefe0439a6f06c92ae1ae6931acd21fcd9c031
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive This file is generated from xml source: DO NOT EDIT
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5a58787efeb02a1c3f06569d019ad81fd2efa06end<title>htpasswd - Manage user files for basic authentication - Apache HTTP Server</title>
5a58787efeb02a1c3f06569d019ad81fd2efa06end<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
5a58787efeb02a1c3f06569d019ad81fd2efa06end<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
5a58787efeb02a1c3f06569d019ad81fd2efa06end<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
5a58787efeb02a1c3f06569d019ad81fd2efa06end<link href="/images/favicon.ico" rel="shortcut icon" /></head>
5a58787efeb02a1c3f06569d019ad81fd2efa06end<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>
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantz<p class="apache">Apache HTTP Server Version 2.1</p>
5a58787efeb02a1c3f06569d019ad81fd2efa06end<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
4b5981e276e93df97c34e4da05ca5cf8bbd937dand<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs-project/">Documentation</a> > <a href="../">Version 2.1</a> > <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>htpasswd - Manage user files for basic authentication</h1>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<p><span>Available Languages: </span><a href="/en/programs/htpasswd.html"> en </a></p>
e23d878014f00a27b043a25e59f809c7af497e5ctakashi <p><code>htpasswd</code> is used to create and update the flat-files used to
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd store usernames and password for basic authentication of HTTP users. If
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd <code>htpasswd</code> cannot access a file, such as not being able to write
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive to the output file or not being able to read the file in order to update it,
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive it returns an error status and makes no changes.</p>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <p>Resources available from the Apache HTTP server can be restricted to
5a58787efeb02a1c3f06569d019ad81fd2efa06end just the users listed in the files created by <code>htpasswd</code>. This
5a58787efeb02a1c3f06569d019ad81fd2efa06end program can only manage usernames and passwords stored in a flat-file. It
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive can encrypt and display password information for use in other types of data
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive stores, though. To use a DBM database see <a href="dbmmanage.html">dbmmanage</a>.</p>
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive <p><code>htpasswd</code> encrypts passwords using either a version of MD5
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive modified for Apache, or the system's <code>crypt()</code> routine. Files
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive managed by <code>htpasswd</code> may contain both types of passwords; some
9bcfc3697a91b5215893a7d0206865b13fc72148nd user records may have MD5-encrypted passwords while others in the same file
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive may have passwords encrypted with <code>crypt()</code>.</p>
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive <p>This manual page only lists the command line arguments. For details of
9bcfc3697a91b5215893a7d0206865b13fc72148nd the directives necessary to configure user authentication in
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive <a href="httpd.html">httpd</a> see the Apache manual, which is part of the
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive Apache distribution or can be found at <a href="http://httpd.apache.org">http://httpd.apache.org/</a>.</p>
9bcfc3697a91b5215893a7d0206865b13fc72148nd<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#synopsis">Synopsis</a></li>
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive<li><img alt="" src="/images/down.gif" /> <a href="#options">Options</a></li>
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive<li><img alt="" src="/images/down.gif" /> <a href="#exit">Exit Status</a></li>
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive<li><img alt="" src="/images/down.gif" /> <a href="#examples">Examples</a></li>
9bcfc3697a91b5215893a7d0206865b13fc72148nd<li><img alt="" src="/images/down.gif" /> <a href="#security">Security Considerations</a></li>
9ed703ab1543b3300f4b60c0405fc1a212b601c8slive<li><img alt="" src="/images/down.gif" /> <a href="#restrictions">Restrictions</a></li>
9ed703ab1543b3300f4b60c0405fc1a212b601c8slive</ul><h3>See also</h3><ul class="seealso"><li><a href="httpd.html">httpd</a></li><li><p>The scripts in support/SHA1 which come with the
9bcfc3697a91b5215893a7d0206865b13fc72148nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi [ -<strong>m</strong> ] <var>passwdfile</var> <var>username</var></code></p>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <p><code><strong>htpasswd</strong> -<strong>b</strong>
a8703cfb67133446eef7af1043640e71486e9ecand -<strong>s</strong> ] <var>passwdfile</var> <var>username</var>
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive <p><code><strong>htpasswd</strong> -<strong>n</strong>
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive -<strong>p</strong> ] <var>username</var> <var>password</var></code></p>
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9bcfc3697a91b5215893a7d0206865b13fc72148nd <dd>Use batch mode; <em>i.e.</em>, get the password from the command line
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive rather than prompting for it. This option should be used with extreme care,
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive since <strong>the password is clearly visible</strong> on the command
392de67005213380d3b88f481ec1e8132935244drbowen <dd>Create the <var>passwdfile</var>. If <var>passwdfile</var> already
392de67005213380d3b88f481ec1e8132935244drbowen exists, it is rewritten and truncated. This option cannot be combined with
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive <dd>Display the results on standard output rather than updating a file.
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive This is useful for generating password records acceptable to Apache for
392de67005213380d3b88f481ec1e8132935244drbowen inclusion in non-text data stores. This option changes the syntax of the
392de67005213380d3b88f481ec1e8132935244drbowen command line, since the <var>passwdfile</var> argument (usually the first
392de67005213380d3b88f481ec1e8132935244drbowen one) is omitted. It cannot be combined with the <code>-c</code> option.</dd>
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive <dd>Use MD5 encryption for passwords. On Windows, Netware and TPF, this is
f78ba66d5075af3e07e2d93aa7fa7b884836c6e8slive the default.</dd>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <dd>Use <code>crypt()</code> encryption for passwords. The default on all
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd platforms but Windows, Netware and TPF. Though possibly supported by
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <code>htpasswd</code> on all platforms, it is not supported by the
b05ab3ff5ab54aa22610b13d56eaba6ddfc3db60nd <a href="httpd.html">httpd</a> server on Windows, Netware and TPF.</dd>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd <dd>Use SHA encryption for passwords. Facilitates migration from/to Netscape
9c1260efa52c82c2a58e5b5f20cd6902563d95f5rbowen servers using the LDAP Directory Interchange Format (ldif).</dd>
<p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p>
<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>