Password Protected
Directories - User Instructions
Intersessions has implemented
password protected directories on all its web servers. This protection is available
to all of our clients. This allows webmasters to password protect any directory or
subdirectory within their data space. When protection is enabled a user browsing
the site is required to enter the correct login name and password in order to view
or execute the web pages, documents and/or cgi programs within that directory.
The webmaster or owner of the domain controls the password authorization by telneting
into the site and executing a few simple commands to add, delete or view authorized
users.
The following are instructions for setting up a subdirectory for login name and password authorization. It is assumed that you are able to telnet into your site and execute some basic Unix commands to create and edit a file.
In the following instructions, we'll assume that the your domain name, login name, subdirectory to be protected, description of the material to be protected and the name of the file of authorized users are:
(1) Telnet into your site.
(2) Create the subdirectory to hold the files to be protected:
(3) Set the proper permissions on the subdirectory:
(4) Enter the subdirectory:
(5) Create a file named '.htaccess'. with the following text:
Note: The 'vi' editor is pretty simple to use. Just type 'vi .htaccess', press 'i' to switch to insert mode, type in the text, press 'esc' to exit insert mode and type ':wq' to exit and save the file.
Now to add users (and create the password file if it does not exist) type:
where 'name' is the login name and 'password' is the password.
To delete a user open the password
file 'users' with the vi editor. Position the cursor on the line you wish to delete
and type 'dd' to delete the line. Type ':wq' to save the new file.
That's about it. Now when someone tries to view a page in your protected directory
a window will appear on their browser asking for a login name and password. Only
if they enter a valid login name and password they'll be permitted entry.