Hi Mike

Thanks for that, and the point you made about the object class!

Before I run the script against active directory, I would just like to
check one or two points.


In the second CFLDAP I currently have

....
<cfldap
action="modify"
modifyType="replace"
attributes="#newAttributes#"
DN="#ldapResults.distinguishedName#"
server="server"
port="389"
username="username"
password="password">
</cfif>

</cfloop>


Is this line correct ? attributes="#newAttributes#"


and how would this CFLDAP statement know to update the phone number of
employee A with the phone number listed for employee A in the CSV file ?
the same for Employee B etc


Regards,

Ian



-----Original Message-----
From: Dawson, Michael [mailto:[EMAIL PROTECTED] 
Sent: 10 March 2008 14:39
To: CF-Talk
Subject: RE: Coldfusion and Active Directory

You are pretty close.

First, I would filter your LDAP results a bit more.  You are pulling in
groups, computers and other objects, in addition to users.

Add this to your first CFLDAP tag:

FILTER="(&(objectCategory=Person)(objectClass=User))" 

It is interesting to note that an objectClass of Computer is also an
objectCategory of Person.  Therefore, I specify both types to narrow it
down to what I want.  I could get by with specifying objectClass=User,
but doing it with both objectCategory and objectClass ensures I don't
select any other objectCategory-ies that may have a User objectClass.

Also, your ATTRIBUTES in the first CFLDAP tag needs to retrieve
"distinguishedName" (DN).  You will need this value to modify the object
later on.

The only other thing I noticed was that the last CFLDAP tag needs to
specify the user's DN rather than the DN to the OU.

In your second CFLDAP tag, change the DN attributes to:

DN="#ldapResults.distinguishedName#"

m!ke



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300956
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to