Solved

login & password

Posted on 1997-07-24
6
225 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
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now