From: Rich Bowen Date: Mon, 4 Jul 2016 17:19:08 +0000 (+0000) Subject: Give an example of converting a password file from one format to the X-Git-Tag: 2.5.0-alpha~1428 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28d1eb804531c20f43afc4707fa3ef467b29dcca;p=apache Give an example of converting a password file from one format to the other. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1751351 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/programs/htdbm.html.en b/docs/manual/programs/htdbm.html.en index 512a73e0c7..a19a374be2 100644 --- a/docs/manual/programs/htdbm.html.en +++ b/docs/manual/programs/htdbm.html.en @@ -279,6 +279,20 @@

Encrypts the password from the command line (Pwd4Steve) using the MD5 algorithm, and stores it in the specified file.

+ +

To convert an existing text file htpasswd-generated + password file to a dbm file, use awk to + feed each line of that file into htdbm:

+ +

+ htdbm -cbp passwords.dbm bogus bogus + awk ‘BEGIN { FS=”:” }; {system (“htdbm -bp passwords.dbm ” $1 ” ” $2)}’ passwords + htdbm -x bogus +

+ +

The first line creates a new password database with a temporary + placeholder entry, and the thrid line removes that placeholder.

+
top

Security Considerations

diff --git a/docs/manual/programs/htdbm.xml b/docs/manual/programs/htdbm.xml index 38bbc0b9e6..522431725e 100644 --- a/docs/manual/programs/htdbm.xml +++ b/docs/manual/programs/htdbm.xml @@ -272,6 +272,20 @@

Encrypts the password from the command line (Pwd4Steve) using the MD5 algorithm, and stores it in the specified file.

+ +

To convert an existing text file htpasswd-generated + password file to a dbm file, use awk to + feed each line of that file into htdbm:

+ + + htdbm -cbp passwords.dbm bogus bogus + awk ‘BEGIN { FS=”:” }; {system (“htdbm -bp passwords.dbm ” $1 ” ” $2)}’ passwords + htdbm -x bogus + + +

The first line creates a new password database with a temporary + placeholder entry, and the thrid line removes that placeholder.

+
Security Considerations