summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2006-01-12 18:34:26 +0000
committerJan Kneschke <jan@kneschke.de>2006-01-12 18:34:26 +0000
commit70120a02996ad3466f62d9d3e8deab1a327c937b (patch)
treed6ad0ace8ef788d9f0187dedea89b60e39fb76e9 /doc
parent4afd2ae2af08e9caf4e858c4c85c127cc1af13dc (diff)
downloadlighttpd-git-70120a02996ad3466f62d9d3e8deab1a327c937b.tar.gz
improved the htdigest example
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@940 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'doc')
-rw-r--r--doc/authentication.txt20
1 files changed, 16 insertions, 4 deletions
diff --git a/doc/authentication.txt b/doc/authentication.txt
index 5dc5cb2f..a8a63b7c 100644
--- a/doc/authentication.txt
+++ b/doc/authentication.txt
@@ -85,7 +85,7 @@ newline. ::
You can use htpasswd from the apache distribution to manage
those files. ::
- $ htpasswd lighttpd.user.digest agent007
+ $ htpasswd lighttpd.user.htpasswd agent007
htdigest
@@ -101,12 +101,24 @@ by a single newline. ::
You can use htdigest from the apache distribution to manage
those files. ::
- $ htdigest src/lighttpd.user.digest 'download area' agent007
+ $ htdigest lighttpd.user.htdigest 'download area' agent007
Using md5sum can also generate the password-hash: ::
+
+ #!/bin/sh
+ user=$1
+ realm=$2
+ pass=$3
+
+ hash=`echo -n "$user:$realm:$pass" | md5sum | cut -b -32`
+
+ echo "$user:$realm:$hash"
+
+To use it:
+
+ $ htdigest.sh 'agent007' 'download area' 'secret'
+ agent007:download area:8364d0044ef57b3defcfa141e8f77b65
- $ echo -n "agent007:download area:secret" | md5sum -
- 8364d0044ef57b3defcfa141e8f77b65 -
ldap