1
votes

I know this question has been asked a few times already but I'm still at a loss :(

What I want to do is pass a security group name to an LDAP query and list out all the users who are a memberof. Am I right in understand that all that's required is to pass in the group's distinguished name, as follows? For some reason, the query is returning a blank.

(&(objectCategory=user)(memberOf={group distinguished name}))

1
That's correct provided { and } are metadata, and provided you search from the right place. Provide a concrete example.user207421
@christok - are you trying to write a piece of code which is taking as programmable input the group distinguished name which I think EJP was hinting at? If not, I was going to ask why are you using '{' and '}' and why not just enter the group distinguished name right into an LDAP query directly? Because in the latter case you wouldn't need the '{' and '}'.John R Smith

1 Answers

1
votes

Thanks for the replies. My query was correct! The reason I wasn't receiving users is that there weren't any in the security group - despite the fact that network admin claimed there were.