Loading ...
Sorry, an error occurred while loading the content.

Apache password creation

Expand Messages
  • Rudolf Horbas
    Hi all, a couple months ago I asked if someone knew how to make an encrypted password for the .htpasswd-file with a ntp-clip. Nobody answered, but maybe not
    Message 1 of 1 , Feb 7, 2002
    • 0 Attachment
      Hi all,

      a couple months ago I asked if someone knew how to make an encrypted password
      for the .htpasswd-file with a ntp-clip. Nobody answered, but maybe not too many
      are playing with Apache's features ...

      Meanwhile I came up with my own solution, and I'll share it:

      1. You need Apache (Win32) installed
      2. This is the clip:
      ---------------
      H="Create Password"
      ^$GetDosOutput("C:\%APACHE-PATH%\BIN\HTPASSWD.EXE -nb ^?[username]
      ^?[password]")$
      ---------------

      (Remember to point \%APACHE-PATH%\ to Your installation directory!)

      The output for e.g. user:password would be something like:

      user:$apr1$vQ/.....$TvTjZcIGCHJsMk7SihXs80

      but the password is never encrypted the same, as everytime some "salt" is added.

      Paste this line into a file named ".htpasswd" (the dot makes it invisible on the
      server!); for every user, You can add such a line.

      In another file named ".htaccess" You write:
      --------------
      AuthType Basic
      AuthName "Restricted Directory"
      AuthUserFile /%FULL PATH%/.htpasswd
      require valid-user

      For more info:
      http://www.apache.org/docs/
      http://httpd.apache.org/docs/howto/auth.html
      http://httpd.apache.org/docs/programs/htpasswd.html

      G'Luck!

      Rudi Horbas
    Your message has been successfully submitted and would be delivered to recipients shortly.