?
Solved

Password protection

Posted on 1997-12-17
11
Medium Priority
?
348 Views
Last Modified: 2013-12-25
Hello.  I have absolutely no experiance in CGI stuff, but I have a new web server that supports CGI-BIN, whatever that is.  Now, I hear that I can use that to password protect my pages, but have ABSOLUTLY no idea how to do it.  I only know how to make my page designs, and upload files.

I want to be able to control access to a "Members Area", based on a list of users and passwords.
I think what I want is a script that is ready-to-use.
ei. I just want to be able to plug it in and make it work.
Thanks!
0
Comment
Question by:StarFieldSoftware
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +4
11 Comments
 

Expert Comment

by:mramsay
ID: 1831679
0
 

Expert Comment

by:mramsay
ID: 1831680
http://www.freecode.com
This site has a range of cgi programs that you should check into

0
 
LVL 5

Expert Comment

by:julio011597
ID: 1831681
If you mean access authentication such that Experts-Exchange provides, you don't need CGI; that's a matter of web server setting.

Anycase, you should state which OS and web server you are on.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 6

Expert Comment

by:alamo
ID: 1831682
It all depends on what server you are using... if you are using a server such as Apache or httpd then you can do what you want by just configuring files, though it does in fact become easier to set up and maintain with CGI scripts (a form to add a user, for instance). If you are using IIS on NT then you can't do standard password authentification (the pop-up box kind) without addding your users as users on your NT system - which may be easier or may be harder, depending on yout point of view. (There is another way to do it on IIS but involves API programing).

There are also other ways to implement passwords which restrict access but aren't server-validated passwords in the same sense. Cookies is the most common... this requires CGI programming, though I bet their are scripts around. It has its drawbacks but migth be enough, you need to tell us more!
0
 

Author Comment

by:StarFieldSoftware
ID: 1831683
I am being hosted on unix, and my hosting company does not support user names/ passwords on files and directories.  I either can set the file to be open to the general public, or only to me.

I have a CGI-BIN, but don't know how to use it.

Thanks!
-Travis
0
 

Expert Comment

by:eribac
ID: 1831684
StarFieldSoftware,

Goto "http://www.itm.com/cgicollection/index.cgi?page=1", and download the Register.pl script. This script will allow you set up a password protection area within you site. This scipt is fairly simple to set up and use, but you will have to invest some time into it.
0
 

Author Comment

by:StarFieldSoftware
ID: 1831685
I looked at the register.pl file, but have no idea what to do with it.  It also refers to another file, something like htpasswd.pl, which I don't have.

Sorry, but I can't use this if I don't have any background in this area.
0
 

Expert Comment

by:mac119
ID: 1831686
I think you really want to be able to use the authorization features of the web server your provider uses, rather than mucking about with a cgi-bin script.

Most providers don't let you muck about too much with user or group privileges on your files, so if you used a cgi-bin script to guard your files, the area from which you would have to read the files would be readable as well.

Servers like NCSA and Apache allow per-directory settings in files named .htaccess; assuming your provider uses Apache (better, and still free) you should go to http://www.apache.org and peruse the documentation sections which deal with Apache's authorization scheme.

It is possible to embed your files in cgi scripts and only allow output to be generated if certain conditions are met (for example, correct user and password cookies) but this is such a pain in the neck that I don't think anyone really does this.
0
 

Author Comment

by:StarFieldSoftware
ID: 1831687
I asked my provider about authentication stuff and they said that they don't provide that.  That is why I need a CGI script. (possibly perl?)
0
 

Accepted Solution

by:
netpro earned 200 total points
ID: 1831688
The very best source for a beginning CGI programmer is in a new book "CGI-Perl CookBook" written in Perl by Matt Wright and Craig Patchett.

It will cost you only $29.95 but it has a security program that will do exactly what you want, and more importantly it has all the documentation (line by line of source code) that tells you how the program works. The book also has many other original Perl programs which are of commercial quality. The CD that comes with the book has program versions for Windows, UNIX and Mac. If you have your own server as I do these programs will open up a new world of Web magic.

The best place I have found to obtain the book with CD-ROM is  at the BookPool http:www.bookpool.com for $29.95.

P.S. I have absolutely "no" connection with the book or authors except I am a very happy Webmaster using these programs.


0
 

Expert Comment

by:netpro
ID: 1831689
I almost forgot--for a preview go to http://www.cgi-perl.com to see some of the Perl programs.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question