I'm not sure what to tell you, it works fine for me. Did you substitute in
"Jason" <jason.whitaker@titan.com> wrote in message
news:018801c38dbb$0c3de6d0$a301280a@phx.gbl...
> Tom,
> The script is authenticating everything (even bogus
> username/password combinations)
>
> any advice?
>
> here is the result I get when I input a bogus user account
> (user:ddd password: ddd) -
>
> Authenticating...
>
> USER AUTHENTICATED!
> Currently viewing object at WinNT://VSDPC/testserver
> Class is Computer
>
> >-----Original Message-----
> >"Jason" <jason.whitaker@titan.com> wrote in message
> >news:000001c38dad$b1041800$a301280a@phx.gbl...
> >> I need help developing a script to log users in to my
> >> website. I want the users to be logged in to
> >> Windows/Active Directory via my website using an ASP
> login
> >> script. Can anyone offer any advice? Are there
> >> components that I can pass a username and password to
> >> Active Directory to log in a user?
> >
> ><html>
> ><head>
> ></head>
> ><body>
> ><form action=authad.asp method=post>
> >Username: <input type=text name=strUserName><br>
> >Password: <input type=password name=strPassword><br>
> ><input type=submit name=btnSubmit>
> ></form>
> ><%
> >If Request.Form("strUsername") <> "" Then
> >Dim strADsPath
> >strADsPath = "WinNT://yourdomain"
> >
> >'userid =
> >strUserName = "yourdomain\" & Request.Form("strUserName")
> >strPassword = Request.Form("strPassword")
> >
> >if (not strADsPath= "") then 'if and ADS Object path has
> been provided
> >proceed with authentication
> >
> > ' bind to the ADSI object and authenticate Username and
> password
> > Dim oADsObject
> > Set oADsObject = GetObject(strADsPath)
> > response.write "Authenticating...<br><br>"
> > Dim strADsNamespace
> > Dim oADsNamespace
> > strADsNamespace = left(strADsPath, instr
> (strADsPath, ":"))
> > set oADsNamespace = GetObject(strADsNamespace)
> > Set oADsObject = oADsNamespace.OpenDSObject(strADsPath,
> strUserName,
> >strPassword, 0)
> > ' we're only bound if err.number = 0
> > if not (Err.number = 0) then
> > Response.Write "<font color='red'><font size =
> 5><u><b>Authentication has
> >failed...<b></u></font></font>"
> > 'Response.Write "Failed to bind to object <b>" &
> strADsPath & "</b><br>"
> > 'response.write err.description & "<p>"
> > 'Response.write "Error number is " & err.number & "<br>"
> > Session("Auth") = "NO"
> > else
> > Response.Write "<font color='blue'>USER AUTHENTICATED!
> </font><br>"
> > 'Response.Write "Currently viewing object at <b>" &
> oADsObject.ADsPath &
> >"</b><br>"
> > 'Response.Write "Class is " & oADsObject.Class & "<br>"
> > Session("Auth") = "YES"
> > end if
> > 'response.write "<p>"
> >end if
> >End If
> >%>
> ></body>
> ><html>
> >
> >
> >--
> >Tom Kaminski IIS MVP
> >
http://www.iistoolshed.com/ - tools, scripts, and
> utilities for running IIS
> >
http://mvp.support.microsoft.com/
> >
http://www.microsoft.com/windowsserver2003/community/cente > rs/iis/
> >
> >
> >
> >.
> >