Readme for Password Program

### *** IMPORTANT *** ###

When you up-laod the cgi's (.pl's) to your server,
use ASCII mode. NOT binary! or you will
get and error.

### *** *** ###

A. Create a directory under your cgi-bin called "password"

1. Configure the (see below)

2. Send the files to your server, in ASCII mode.  /cgi-bin/password/ all .pl files and user.log

3. On Unix, Chmod the cgi's to 755 or rwx-rx-rx

   On Unix, Chmod the user.log to 666 or rw-rw-rw  

Chmod is not necessay on Windows NT.

4. Make a directory called "htmfiles" (no quotes) 
   Place all files you want to protect in this directory. 

      If you are on a UNIX system, you can place the "secured" files anywhere in your
	documents area. Chmod the directory for the secure files to 711 rwx-x-x - this
	way no one has read access except you(the owner)

      If you are on an NT system, you can place the "secured" files anywhere in your
	documents area. Set the directory for the secure files to:

5. Put a link to the login.html on your page (the login.html is a frameset that calles -> login-form.html) Ranson's Scripts FAQ and install help

To add a user to your system, call the with your browser. That is, type the URL of the in the "location" line of whatever browser you are using.
Enter a user name and password for that user. This writes their user name and password to the 'user.log'.

Your Protected Files

Place all the files you want to protect in the "htmfiles" folder.
In the, you will tell the program what file you want the user to see when they first login. (the default file) You must use this page as your 1st page after login.

To protect the web address of other files, you will need to link them "through" the
This is done with ``arguments" in the link to the the first ``argument" would be just after the question mark -> - in this case the 1st argument is ``999"

The link to ASCII files, in this case page2.html, would look something like this:
<> (the 999 must be in the URL exactly as shown)

The link to DownLoad Files, in this case doc.pdf, would look something like this:
<> (the 990 must be in the URL exactly as shown)

Do Not use the extention on the link to the protected files. The program will detect the extention and add it for you.

No one ever sees the URL to the pages, they will only see the URL of the

I have supplied 5 pages for you to test with. They are in the folder "htmfiles". Use these files to get the program running on your server. Then replace them with your files.

### *** *** ###



# The path to the files is very important for the program to function.
# The PATH is NOT the WEB ADDRESS(http://www.?)

# The path on Windows NT systems will look something like: 
# $nt_path = 'c:\InetPub\wwwroot\my_folder\htmfiles';

# The path on Unix systems will look something like: 
# $unix_path = '/home/httpd/html/my_folder/htmfiles';

# Run "" to determine your correct path
# Available from Ranson's Scripts


#             ### *** CONFIGURATION SECTION *** ###

# Enter an Administrator username and password
#	Required for add_user program
$username = 'admin';
$password = 'admin';

# Enter the complete path and name of the user.log (password file)
$user_list = 'c:\website\wsdocs\new-password\cgi-bin\user.log';

# Enter the path and name to the directory (folder) where the files are
# you want to password protect
$protected_files = 'c:\website\wsdocs\new-password\htmfiles';

# Enter the name of the default file to open when the user logs in
$default_file = 'page1.html';

# Enter your domain name in the variable below '$ok_domain'
# you do not need the www.  or  the .com  just your domain name
# this is used for securiety purposes not allowing access 
# from remote sites.
# If you need more than one domain use a pipe between domain names
# 2 Domain Example = '$ok_domain = 'tennet|ultrahtml';
$ok_domain = 'localhost';

# If you want to maintain access ONLY from your site enter '1' below
# 	The page can not be bookmarked or accessed from another site
$restricted_access = '1';

# Enter the web address for your login page.
$login_page = 'http://localhost/wsdocs/new-password/login.htm';

# Enter all the file extentions you will be using for your protected
# files - follow the format below
@ProtectedFiles = ("htm", "html", "asp", "pdf", "zip", "exe"); 

### *** *** ###