Authentication vía ASP and ADSI 
Author Message
 Authentication vía ASP and ADSI

Hello,
i have a little problem. I would like to program a login
page that look up an Domain-Account. I started with a
simple pice of code :

'Variablen deklarieren.
Dim domUser

'Objekte Definieren.
Set domUser = GetObject("WinNT://" & Request("dom") & "/"
& Request("user"))

If domUser.Name = Request("user") and domUser.Password =
Request("pass") Then
Response.Write "True"
End if

The problem is that the method domUser.Password does not
exist. I don't know where i can find more information
about the objects and the method.
I can't find anything in the msdn or at the Microsoft hp.
Could anybody help me ?

Greetings from Germany
Manuel Rodriguez



Sun, 17 Jul 2005 21:40:06 GMT  
 Authentication vía ASP and ADSI

Quote:
> The problem is that the method domUser.Password does not
> exist. I don't know where i can find more information
> about the objects and the method.

ADSI will never give you a plain text user password.  AFAIK, there isn't
even a Win32 API call that would do that...

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US



Mon, 18 Jul 2005 10:29:41 GMT  
 Authentication vía ASP and ADSI
Thanks for answering...
Perhaps I have a solution:

on error resume next

Dim objAdsObject
Dim strUserName
Dim strPassword
Dim strDomainPath
Dim strDomain
Dim strUserADsPath
Dim objGroup

strUserName = request.form("user")
strPassword = request.form("pass")
strDomain = request.Form("dom")
strDomainPath = "WinNT://" & strDomain
strUserADsPath = strDomainPath & "/" & strUsername

Set objAdsObject = GetObject("WinNT:").OpenDSObject
(strDomainPath, strDomain & "\" & strUserName,strPassword,
0)

If err.number = 0 then

set objGroup = GetObject(strUserADsPath)

 For each member in objGroup.groups
        response.write member.name & ""
next

set objGroup = nothing
set objAdsObject = nothing

elseif err.number = "-2147023570" then
response.write "Incorrect logon credentials"
else response.write err.number & ": " & err.description
end if

But this solution operates only with my Workstation not
with a DC....
Where can i find a Object Description ?
Can anybody help me ?



Mon, 18 Jul 2005 15:22:48 GMT  
 Authentication vía ASP and ADSI
The Solution work fine. The Problem was that i was
currently declared i the Domain.


Mon, 18 Jul 2005 15:44:13 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Reading NTFS Rights vía ASP Part 2

2. ADSI binding authentication problem

3. ADSI authentication with OpenDSObject

4. NT User Authentication through ASP

5. Passing Password to NT (directory authentication) from ASP

6. NT User Authentication through ASP

7. Member Authentication using ASP

8. Challenge/Response authentication through ASP?

9. ASP use NT Authentication revisted?

10. how to force authentication on an ASP

11. ASP.Net Forms Authentication

12. NT Authentication w/ASP

 

 
Powered by phpBB® Forum Software