Make your own free website on Tripod.com
Readme for Password Program

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

When you up-laod this cgi to your server,
use ASCII mode. NOT binary! or you will
get and error.

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

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

1. Configure the passwd-conf.pl (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  

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

      SECURIETY NOTE: It is best to make this directory under your cgi-bin (cgi-bin/htmfiles)
		      Usually a directory under your cgi-bin can not be accessed with a 
		      Web Browser.
      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)

5. Put a link to the login.html on your page
   (the login.html is a frameset that calles -> login-form.html)



Chmod is not necessay on Windows NT.



Ranson's Scripts FAQ and install help

To add a user to your system, call the adduser.pl with your browser. That is, type the URL of the adduser.pl in the "location" line of whatever browser you are using.
http://www.your_server.com/cgi-bin/adduser.pl
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 login.pl, you will tell the program what file you want the user to access when they login. (the default file)
To protect the web address of other files, you will need to link them "through" the login.pl.
The link to page2.html would look something like this:
<http://www.your_server.com/cgi-bin/login.pl?999&page2> (the 999 must be in the URL exactly as shown)

Do Not use the .html on the link to the protected files. The program will do that for you.
(The files must be named something.html)

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

I have supplied 3 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.



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

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

#             CONFIGURATION FILE FOR RLAJ.COM'S PASSWORD PROGRAM V 2.0


# 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 "pathtest.pl" to determine your correct path
# Available from Ranson's Scripts
# http://www.rlaj.com/scripts/sitetest/pathtest.zip

# IF ALL ELSE FAILS, ASK YOR SYSTEM ADMINISTRATOR (HELP DESK)



#             ### *** 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';

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