summaryrefslogtreecommitdiffstats
path: root/docs/manual/programs/htpasswd.html.en
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2019-07-05 14:21:52 +0200
committerJoe Orton <jorton@apache.org>2019-07-05 14:21:52 +0200
commit29a3e3e50af3f0ba3c486b5e28bd3801be166c33 (patch)
treed10b2f7d103a28df830757f9fd2e9ff3439aef86 /docs/manual/programs/htpasswd.html.en
parentDocument SHA-2 support. (diff)
downloadapache2-29a3e3e50af3f0ba3c486b5e28bd3801be166c33.tar.xz
apache2-29a3e3e50af3f0ba3c486b5e28bd3801be166c33.zip
Transforms.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1862610 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/programs/htpasswd.html.en')
-rw-r--r--docs/manual/programs/htpasswd.html.en68
1 files changed, 51 insertions, 17 deletions
diff --git a/docs/manual/programs/htpasswd.html.en b/docs/manual/programs/htpasswd.html.en
index 684066e1c2..61ec4cb627 100644
--- a/docs/manual/programs/htpasswd.html.en
+++ b/docs/manual/programs/htpasswd.html.en
@@ -42,13 +42,14 @@
stores, though. To use a DBM database see <code class="program"><a href="../programs/dbmmanage.html">dbmmanage</a></code> or
<code class="program"><a href="../programs/htdbm.html">htdbm</a></code>.</p>
- <p><code>htpasswd</code> encrypts passwords using either bcrypt,
- a version of MD5 modified for Apache, SHA1, or the system's
- <code>crypt()</code> routine. Files
- managed by <code>htpasswd</code> may contain a mixture of different encoding
- types of passwords; some
- user records may have bcrypt or MD5-encrypted passwords while others in the
- same file may have passwords encrypted with <code>crypt()</code>.</p>
+ <p><code>htpasswd</code> encrypts passwords using either bcrypt, a
+ version of MD5 modified for Apache, SHA-1, or the system's
+ <code>crypt()</code> routine. SHA-2-based hashes (SHA-256 and
+ SHA-512) are supported for <code>crypt()</code>. Files managed by
+ <code>htpasswd</code> may contain a mixture of different encoding
+ types of passwords; some user records may have bcrypt or
+ MD5-encrypted passwords while others in the same file may have
+ passwords encrypted with <code>crypt()</code>.</p>
<p>This manual page only lists the command line arguments. For details of
the directives necessary to configure user authentication in
@@ -71,9 +72,12 @@ distribution.</li><li><a href="#comments_section">Comments</a></li></ul></div>
[ -<strong>i</strong> ]
[ -<strong>m</strong> |
-<strong>B</strong> |
+ -<strong>2</strong> |
+ -<strong>5</strong> |
-<strong>d</strong> |
-<strong>s</strong> |
-<strong>p</strong> ]
+ [ -<strong>r</strong> <var>rounds</var> ]
[ -<strong>C</strong> <var>cost</var> ]
[ -<strong>D</strong> ]
[ -<strong>v</strong> ] <var>passwdfile</var> <var>username</var></code></p>
@@ -82,9 +86,12 @@ distribution.</li><li><a href="#comments_section">Comments</a></li></ul></div>
[ -<strong>c</strong> ]
[ -<strong>m</strong> |
-<strong>B</strong> |
+ -<strong>2</strong> |
+ -<strong>5</strong> |
-<strong>d</strong> |
-<strong>s</strong> |
-<strong>p</strong> ]
+ [ -<strong>r</strong> <var>rounds</var> ]
[ -<strong>C</strong> <var>cost</var> ]
[ -<strong>D</strong> ]
[ -<strong>v</strong> ] <var>passwdfile</var> <var>username</var>
@@ -94,17 +101,23 @@ distribution.</li><li><a href="#comments_section">Comments</a></li></ul></div>
[ -<strong>i</strong> ]
[ -<strong>m</strong> |
-<strong>B</strong> |
+ -<strong>2</strong> |
+ -<strong>5</strong> |
-<strong>d</strong> |
-<strong>s</strong> |
-<strong>p</strong> ]
+ [ -<strong>r</strong> <var>rounds</var> ]
[ -<strong>C</strong> <var>cost</var> ] <var>username</var></code></p>
<p><code><strong>htpasswd</strong> -<strong>nb</strong>
[ -<strong>m</strong> |
- -<strong>B</strong> |
+ -<strong>B</strong> |
+ -<strong>2</strong> |
+ -<strong>5</strong> |
-<strong>d</strong> |
-<strong>s</strong> |
-<strong>p</strong> ]
+ [ -<strong>r</strong> <var>rounds</var> ]
[ -<strong>C</strong> <var>cost</var> ] <var>username</var>
<var>password</var></code></p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -137,6 +150,14 @@ distribution.</li><li><a href="#comments_section">Comments</a></li></ul></div>
<dd>Use MD5 encryption for passwords. This is the default (since version
2.2.18).</dd>
+ <dt><code>-2</code></dt>
+ <dd>Use SHA-256 <code>crypt()</code> based hashes for passwords. This is
+ supported on most Unix platforms.</dd>
+
+ <dt><code>-5</code></dt>
+ <dd>Use SHA-512 <code>crypt()</code> based hashes for passwords. This is
+ supported on most Unix platforms.</dd>
+
<dt><code>-B</code></dt>
<dd>Use bcrypt encryption for passwords. This is currently considered to
be very secure.</dd>
@@ -146,6 +167,12 @@ distribution.</li><li><a href="#comments_section">Comments</a></li></ul></div>
encryption). It sets the computing time used for the bcrypt algorithm
(higher is more secure but slower, default: 5, valid: 4 to 17).</dd>
+ <dt><code>-r</code></dt>
+ <dd>This flag is only allowed in combination with <code>-2</code>
+ or <code>-5</code>. It sets the number of hash rounds used for the
+ SHA-2 algorithms (higher is more secure but slower; the default is
+ 5,000).</dd>
+
<dt><code>-d</code></dt>
<dd>Use <code>crypt()</code> encryption for passwords. This is not
supported by the <code class="program"><a href="../programs/httpd.html">httpd</a></code> server on Windows and
@@ -154,9 +181,10 @@ distribution.</li><li><a href="#comments_section">Comments</a></li></ul></div>
It used to be the default algorithm until version 2.2.17.</dd>
<dt><code>-s</code></dt>
- <dd>Use SHA encryption for passwords. Facilitates migration from/to Netscape
- servers using the LDAP Directory Interchange Format (ldif).
- This algorithm is <strong>insecure</strong> by today's standards.</dd>
+ <dd>Use SHA-1 (160-bit) encryption for passwords. Facilitates migration
+ from/to Netscape servers using the LDAP Directory Interchange
+ Format (ldif). This algorithm is <strong>insecure</strong> by
+ today's standards.</dd>
<dt><code>-p</code></dt>
<dd>Use plaintext passwords. Though <code>htpasswd</code> will support
@@ -245,13 +273,19 @@ distribution.</li><li><a href="#comments_section">Comments</a></li></ul></div>
8 characters of the password are used to form the password. If the supplied
password is longer, the extra characters will be silently discarded.</p>
- <p>The SHA encryption format does not use salting: for a given password,
- there is only one encrypted representation. The <code>crypt()</code> and
- MD5 formats permute the representation by prepending a random salt string,
- to make dictionary attacks against the passwords more difficult.</p>
+ <p>The SHA-1 encryption format does not use salting: for a given
+ password, there is only one encrypted representation. The
+ <code>crypt()</code> and MD5 formats permute the representation by
+ prepending a random salt string, to make dictionary attacks
+ against the passwords more difficult.</p>
+
+ <p>The SHA-1 and <code>crypt()</code> formats are insecure by
+ today's standards.</p>
- <p>The SHA and <code>crypt()</code> formats are insecure by today's
- standards.</p>
+ <p>The SHA-2-based <code>crypt()</code> formats (SHA-256 and
+ SHA-512) are supported on most modern Unix systems, and follow the
+ specification at <a href="https://www.akkadia.org/drepper/SHA-crypt.txt">https://www.akkadia.org/drepper/SHA-crypt.txt</a>.</p>
+
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="restrictions" id="restrictions">Restrictions</a> <a title="Permanent link" href="#restrictions" class="permalink">&para;</a></h2>