Solved

login & password

Posted on 1997-07-24
6
240 Views
Last Modified: 2013-12-25
I use Microsoft Information Server 3.0 (Windows NT4.0+NTFS).
I have some folders not for everyone. So when I get access to this restricted folders I need to enter login & password.
In one of my web pages in this folder I have a form which has CGI as an action. The question is: Can I use this login & password in my CGI script? How can I do it? I use Borland C++ 5.0. I suppose that I can get login from "REMOTE_USER"
environment variable. But what about password?
0
Comment
Question by:sto072097
[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
6 Comments
 
LVL 5

Expert Comment

by:icd
ID: 1829375
I don't have the answer to this question, but I have seen several queries similar to yours.

UNIX uses the .htaccess method which does not map over onto NT, as I understand it any equivalent method on NT requires an NT type login account. The REMOTE_USER does not work on NT as it does on UNIX.

0
 
LVL 2

Expert Comment

by:Philippe
ID: 1829376

Remote user doesn't work with most browsers.

 Philippe

0
 
LVL 2

Expert Comment

by:n3mtr
ID: 1829377
For Philippe: that's not right Remote_user will be available on most unix hosts after the user logs in(as required by .htaccess). You are prabably thinking of http_from which was designed to give the users email address.(don't worry most browsers don't use this)
for sto: Why would you need the password?  They have already been authenticated by the system.  If they are accessing your script, they have access, and you can use remote_user to see who it is(if you have more than one user).  If you don't have more than one user don't bother checking it at all.
I don't know about NT; icd might be right about remote_user not working.  There may be some other way to find out who has logged in.
0
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 

Author Comment

by:sto072097
ID: 1829378
For n3mtr: My script works with Interbase database so I need password for Interbase authentication.
0
 
LVL 1

Expert Comment

by:buemoh
ID: 1829379
sto - that's only a small idea:

Have a look at the WindowsNT IIS helpfiles, because some w3 servers need special naming of the cgi. (WebSite do so, a cgi, which should get the username and password have to start with a "$").

If WindowsNT and IIS doesn't gave you any possibility to get the password, generate one with the username and a string stored in the cgi. - I do this on my WindowsNT IIS 3.0 machine, because I didn't find out how to get the password.

By the way, I'm programmin with Borland Delphi 2.x and I wrote a component supporting the CGI interface - it's free.

0
 

Accepted Solution

by:
ernst earned 100 total points
ID: 1829380
you can't get the password, because the password is encrypted
in one direction.  You need to store the password somewhere
that you can retrieve it based on the userid, which you can get
from the REMOTE_USER environment variable.  The REMOTE_USER
variable is available on all browsers that can go to a page with authentication.  In otherwords, if you can't get the REMOTE_USER variable, they can't see your page, so it doesn't matter.  I use
a database table with the user and password stored in it.  
0

Featured Post

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

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 provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The viewer will learn how to count occurrences of each item in an array.
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)

726 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