Reputation: 23
Using the CFLDAP tag in ColdFusion I can successfully retrieve someone's distinguidedName and manager attributes with a filter like this:
(&(objectcategory=person)(objectclass=user)([email protected]))
This reveals values such as these for the distinguidedName and manager attributes:
distinguishedName:
CN=Test\, Tim,OU=Dev,OU=IS,OU=Resources,OU=Staff,DC=natlib_1,DC=nls,DC=uk
manager:
CN=Test\, Sue,OU=Dev,OU=IS,OU=Resources,OU=Staff,DC=natlib_1,DC=nls,DC=uk
What I want to do next is find everyone else managed by Sue Test. The only attribute available to do this (that I can see at least) is the 'manager' attribute which has the dn syntax. Logic would suggest something like this:
(&(objectcategory=person)(objectclass=user)(manager=CN=Test\, Sue,OU=Dev,OU=IS,OU=Resources,OU=Staff,DC=natlib_1,DC=nls,DC=uk))
But nope... that returns nothing. I've spent hours Google-ing and trying all sorts of alternatives but nothing I have found so far works. So if someone could provide me with the correct value to put in the filter attribute of the ColdFusion CFLDAP
tag to filter on a dn syntax LDAP attribute such as manager, I'd be eternally grateful!
(Identities changed in the included example to protect the innocent!)
Upvotes: 2
Views: 358
Reputation: 480
What else works: replace \
with \\
.
Though I wish I'd found this post earlier so I didn't waste time figuring this out for myself!
Upvotes: 0
Reputation: 26
Replace the backslash before the comma with \5c and it should work.
Reference: https://msdn.microsoft.com/en-us/library/aa746475.aspx#SPECIAL_CHARACTERS
Michael
Upvotes: 1