#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    12
    Rep Power
    0

    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?
  2. #2
  3. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    What are you searching with? the command line tool (ldapsearch)? Or something else?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    12
    Rep Power
    0
    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?
  6. #4
  7. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    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
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    12
    Rep Power
    0
    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
  10. #6
  11. Chris Larivee
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Littleton, CO
    Posts
    72
    Rep Power
    12
    The memberOf attribute is what you need to return from the search to list all groups the user belongs to in AD ...

IMN logo majestic logo threadwatch logo seochat tools logo