Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Password Dialog

Posted on 1997-11-16
1
Medium Priority
?
185 Views
Last Modified: 2013-12-25
I would like to display a password dialog, similar to the one displayed when you log onto Experts Exchange.  Can this be done in CGI
0
Comment
Question by:dl090597
[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
1 Comment
 

Accepted Solution

by:
Rubyrhod earned 100 total points
ID: 1831269
The password dialog displayed at the Experts Exchange login is a feature of HTTP's "Basic Authentication" system. It is not created or invoked via CGI scripting, but by a Web server directive that instructs the server to use authentication. That said, it's true that most of the interesting things you might want to do involving basic authentication will require some CGI scripting. For example, the features at Experts Exchange that allow one to create a login/password pair and gain access to the site without human intervention on the part of the site's maintainers is almost certainly based on CGI scripts.

The method used to "turn on" basic authentication is going to depend on the particular Web server you're working with. If you're using NCSA's web server, or the Apache server based on it, it's pretty simple. Typically, you just create a file called ".htaccess" (the initial period is important) in the directory that you want to have protected, and place some text in that file telling the server how you want authentication to be applied. You also will probably need to use a program called "htpasswd" from the Unix command line to set the username/password pair(s) allowed in that directory; this information typically gets stored in some other directory in a file called ".htpasswd". Once this is set up properly, the server will prompt the user for a name/password pair whenever the user tries to access a document in the protected directory, allowing access if the name/password pair matches the stored information, and denying access if it doesn't.

An excellent tutorial on this is at NCSA's Web site. Check out http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html if you're using NCSA's server or Apache. If you're using another type of server this tutorial may or may not be helpful; in that case you'll probably want to consult your server's documentation.

A good overview of this issue (which basically boils down to trying to create a "login" feature under the Web's HTTP protocol) is at the following address: http://www.webthing.com/tutorials/login.html

Good luck!


0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

636 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