Helpful Information
 
 
Category: LDAP Programming
Active directory search

if I were to login with a user, how would I use ldap to find out which user groups a person belonged to?

What are you searching with? the command line tool (ldapsearch)? Or something else?

Oops, I forgot to post that. I am trying to use a php interface, so I guess that would mean I would be trying to use the ldap_search() function.

Does that help?

So you just need a filter to put in it right? Well to create one I need to know how the stucture of the entries you want to search are.

Here is the RFC on how to create filters http://www.faqs.org/rfcs/rfc2254.html

Not sure if this is what you want but:

Well, I want it to return the global groups that the user, who has logged in, is a part of.

[Or do you mean the "dc=usask,dc=ca" part?" because the user could be in any of the OUs and then in any of the containers below that.]

Thanks Viper

The memberOf attribute is what you need to return from the search to list all groups the user belongs to in AD ...










privacy (GDPR)