?
Solved

How to authenticate intranet users

Posted on 2003-03-11
4
Medium Priority
?
303 Views
Last Modified: 2010-04-13
Hi
I need to retrieve an ADS attribute for the currently
logged on user from an asp page, to authenticate who they are.

Using
Set objSysInfo = CreateObject("ADSystemInfo")
strUserDN = objSysInfo.UserName
strADsPath = "LDAP://" & strUserDN
Set objADs = GetObject(strADsPath)
x = objADS.<attribute>

Returns the attribute of the anonymous internet account,
but I need to return the attribute of the ADS
authenticated user when the site is accessed via the
Intranet.
Thought it would be simple, but cannot find any info on
how to do this.
Creating a dll also returns the anonymous internet account attributes, as it also is generated from the same calling thread as the asp code.

Thanks in advance
VicOm
0
Comment
Question by:VicOm
[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
  • 2
  • 2
4 Comments
 
LVL 12

Expert Comment

by:pjknibbs
ID: 8117856
As far as I know you can get the username of the currently authenticated user (assuming you've set your Intranet to require authentication) by simply retrieving the server variable LOGON_USER (e.g. Request.ServerVariables("LOGON_USER")). Assuming you've disabled Anonymous access to the Intranet then the user should already be authenticated by the time this code is called, so that should be all you need to do.
0
 

Author Comment

by:VicOm
ID: 8121944
Unfortunately I still need to allow anonymous access which prevents me using this method.
The idea is to log an authenticated (via ADS) intranet user directly into the site, without them having to input a username/password, but force all other (anonymous) users to login through a standard web form log-in page.
0
 
LVL 12

Accepted Solution

by:
pjknibbs earned 150 total points
ID: 8126021
I think the problem there is that IIS will just automatically pipe everyone through the anonymous account and therefore won't bother authenticating your Intranet users, which is why your method is returning the account name for the anonymous user.

All I can suggest is that you put a different entry page on the site for your authenticated Intranet users, and get the username into a session variable or something in that page.
0
 

Author Comment

by:VicOm
ID: 8147578
I have created an exe that the users will run that extracts the authenticated user info from ADS, encrypts it and then launches the browser, passing this data along with it.
Thanks for the help.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

777 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