Re: Password Protected Site

by "Darrell King" <darrell(at)webctr.com>

 Date:  Sat, 12 Aug 2000 07:30:35 -0400
 To:  "Susan Vollmer" <susanvollmer(at)hotmail.com>,
<hwg-basics(at)hwg.org>
 References:  hotmail
  todo: View Thread, Original
Nice of you to take the time to return all this to the list, Susan.  It's
exactly the kind of generous gesture that keeps me on this list.

One thing I'd like to add is that many (all?) systems require that an
absolute system path be used when referencing the .htpasswd file location in
the command line.  Remember that the location needs to be writable by the
user executing the commands.

Imention this because it tripped someone else up recently...and it tripped
me up when I did my first htpasswd way back when...:)

D


----- Original Message -----
From: "Susan Vollmer" <susanvollmer(at)hotmail.com>

>I hope the response to this is posted here and not private.  I have the
>same
>concern.
>[snip]

I have only set up password protection once, but here are my notes which I
documented for future reference.  Much of this content I thank Darrell for
helping me.  Also, several persons recommended these tutorials.

     http://faq.web2010.com/htaccess.htm
     http://www.apacheweek.com/features/userauth
     http://www.psoft.net/htaccess.html

The only part I couldn't get to work was I couldn't change the username from
the original one I set.  However, that's not causing us a problem and the
password is protecting an entire directory of files and images.

I also have this same information as below color coded in a Microsoft Word
document.  If you want it, send me an email.  I color code syntax in red
which is to be used verbatim and color code in black the variable
information which the webmaster changes to match appropriate file names.

Regards, Susan V.

==================================================


STEP 1:

In Notepad, create an .htaccess file.  Below is the file.  I saved it as an
".htaccess.htm" file.  Windows would not let me rename it ".htaccess"; so I
used FTP to upload ".htaccess.htm" as an ASCII file and renamed it in FTP as
just ".htaccess" -- the content of file ".htaccess" is below:


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * ** *


AuthUserFile      /home/yourwebsitename/www/directoryname/.htpasswd

AuthGroupFile   /dev/null

AuthName          "Type Here Name Of Realm To Appear On Password Box"

AuthType           Basic


<Limit GET POST>
allow from yourwebsitename.com
require user USERNAME
</Limit>


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * *

================================================


STEP 2:

This is to create the entry name USERNAME and assign a PASSWORD to it.
I used the built-in Telnet access of Windows '95 as follows:
    --  Hold down the Start button and go to "Run"
    --  Type:  telnet yourwebsitename.com

Terminal
     Start  logging
     Open  log  file


(Below is a copy of my telnet.log:)

login:  yourwebsitename
Password:  ************
Last login: Tue Jul 25 06:23:58 from 201.st-louis-10
**************************************************************************
Policies

The following items are not allowed:

1)IRC and IRC bots.
2)Any unsolicited bulk email sent thru the system or containing a
  reference to a domain on this system.
3)Adult or obscene Materials or links to them.
4)Chat room scripts.
5)Pirated materials or links to pirated sites.
6)Any *attempt* to undermine the system.

          Any violation will result in loss of access privileges.
Thank you
**************************************************************************
west36:~$ htpasswd -c /home/yourwebsitename/www/training/.htpasswd USERNAME
Adding password for USERNAME.
New password:    INSERTPASSWORD
Re-type new password: INSERTPASSWORD


(Note:  After entering the password twice, I stopped logging on the Telnet,
disconnected and exited.)
=================================================


STEP 3:

This is to create the entry name USERNAME and assign a PASSWORD to it.  The
main differences between Step 2 and Step 3 is that  Step 3 omits the "-c" in
the code and creates a different username.

I used the built-in Telnet access of Windows '95 as follows:
    --  Hold down the Start button and go to "Run"
    --  Type:  telnet yourwebsitename.com

(Below is a copy of my telnet.log:)


login: yourwebsitename
Password:  ************
Last login: Tue Jul 25 07:15:26 from 201.st-louis-10
**************************************************************************
Policies ...

**************************************************************************
west36:~$     htpasswd/home/yourwebsitename/www/training/.htpasswd
NEWUSERNAME
Adding user  NEWUSERNAME
New password:   INSERTPASSWORD
Re-type new password:  INSERTPASSWORD

                 (end documentation)


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA