This should get you going.. also go to http://www.ldapadministrator.com
<http://www.ldapadministrator.com/>    and download their ldap browser.  It
will give you all the information you need in order to get you going....

 

<cfscript>

 //<!--- setting basic LDAP server attributes - DRAGON --->

            root = "dc=ADOBE,dc=COM";

            servername = "YOUR LDAP SERVER IP";

            port = "389";

                                

 //<!--- Attributes must include uid and dn.  These are used within the 2
authorization queries. --->

                                            

            attributes =
"dn,description,useraccountcontrol,userpassword,ntseecuritydescriptor,pwdlas
tset";

                                

 //<!--- passing the username and password of the  user to authenticate --->

//<!--- you can use this secion here if you want to use a form submitted
username and password for loggin into to an app --- >


             uid = "#form.user#";

             password = "#form.pword#";

                                

//<!--- this filter will look in the objectclass for the user's ID --->

                                            

      filter = "(&(objectclass=*)(sAMAccountName=#uid#))";

                                

 //<!--- use directory manager id to allow a read of the password to
authenticate users --->

                                            

                                 LDAP_username = "CN=Admin USER
NAME,OU=ADMIN GROUP,OU=Admin GROUP,OU= Admin GROUP,DC=ADOBE,DC=COM";

                                 LDAP_password = "Admin Password";

</cfscript>

 <!--- search for the user's dn, this is used below to authenticate the user
NOTE: We must do this as the Directory Manager in order to return the
password.  --->

                                

                              <cftry>

                                           <cfldap action="QUERY"

                                                       name="userSearch"

 
attributes="#attributes#"

                                                       start="#root#"

                                                       scope="SUBTREE"

                                                       server="#servername#"

                                                       port="#port#"

                                                       filter="#filter#"

 
username="#LDAP_username#"

 
password="#LDAP_password#"

                                           >     

                                      <cfcatch type="Any">

                                                <cfset UserSearchFailed =
true>

                                      </cfcatch>

                               </cftry>

 

 

-- Brian --



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244304
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to