It�s possible to check usernames and passwords in an NT-domain, unfortunatly
I only have the code-example in ASP but maybe someone could make a
com-object of it or write it in Cold Fusion instead.

It uses "ADsDSOObject" to connect to the NT-domain via LDAP, if a correct
username and password is supplied it works fine with no errors, if not, an
error occurs.

--- CODE STARTS HERE ---

<%
Function FindAddress(vSnFragment, vLdapPath)

   Set oConn = Server.CreateObject("ADODB.Connection")
   oConn.Provider = "ADsDSOObject"

' for NT4/Exchange authentication

   oConn.Properties("User ID") = "NtDomain\NtUser"
   oConn.Properties("Password") = "NtPassword"
   oConn.Properties("Encrypt Password") = True

   oConn.Open

   vSQL = "SELECT cn,mail FROM '" & vLdapPath & _
      "' WHERE sn='" & vSnFragment & "*'"

   Set oRs = oConn.Execute(vSQL)

   Do While Not oRs.EOF
      FindAddress = FindAddress & oRs("cn").Value & ","
      FindAddress = FindAddress & oRs("mail").Value & ";"
      oRs.MoveNext
   Loop

End Function

Response.Write FindAddress("schwani", "LDAP://my.ldap.server.com")
%>

--- CODE ENDS HERE ---


// Daniel


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to