Announcement

Collapse
No announcement yet.

Searching AD using LDAP Filter?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Searching AD using LDAP Filter?

    I'm trying to search using an AD using LDAP filter but to no avail.
    Code:
    filter: &(cn=me)(memberOf=CN=dept,OU=dept,OU=group,DC=comp any,DC=local)
    
    basedn: OU=group,DC=company,DC=local
    This doesn't return a result even though user 'me' is part of the Group. Will greatly appreciate any suggestions. Thanks.

  • #2
    Re: Searching AD using LDAP Filter?

    Originally posted by touchring View Post
    I'm trying to search using an AD using LDAP filter but to no avail.
    Code:
    filter: &(cn=me)(memberOf=CN=dept,OU=dept,OU=group,DC=comp any,DC=local)
    
    basedn: OU=group,DC=company,DC=local
    This doesn't return a result even though user 'me' is part of the Group. Will greatly appreciate any suggestions. Thanks.

    Hi Can you explain a bit what are you trying to achieve. I can help you using powershell and quest ad management cmdlets
    Thanks & Regards
    v-2nas

    MCTS 2008, MCTIP, MCSE 2003, MCSA+Messaging E2K3, MCP, E2K7
    Sr. Wintel Eng. (Investment Bank)
    Independent IT Consultant and Architect
    Blog: http://www.exchadtech.blogspot.com

    Show your appreciation for my help by giving reputation points

    Comment


    • #3
      Re: Searching AD using LDAP Filter?

      Originally posted by v-2nas View Post
      Hi Can you explain a bit what are you trying to achieve. I can help you using powershell and quest ad management cmdlets

      filter: &(cn=me)(memberOf=CN=dept,OU=dept,OU=group,DC=c omp any,DC=local)

      basedn: OU=group,DC=company,DC=local
      Thanks, I'm trying to search the AD for "cn=me", which is a memberof "CN=dept,OU=dept,OU=group,DC=comp any,DC=local"

      Comment


      • #4
        Re: Searching AD using LDAP Filter?

        Originally posted by touchring View Post
        filter: &(cn=me)(memberOf=CN=dept,OU=dept,OU=group,DC=c omp any,DC=local)

        basedn: OU=group,DC=company,DC=local
        Thanks, I'm trying to search the AD for "cn=me", which is a memberof "CN=dept,OU=dept,OU=group,DC=comp any,DC=local"
        How exactly are you 'trying to search'? - Are you using a (what kind) script, tool or using "Saved queries"?
        Note that 'memberof' is an attribute. Your filter searches for ALL kind of object types in the active directory where the 'Common name' attribute is "Me" and the 'Memberof' attribute of that object must contain the "dn of a specific group" (also note that the primary-group is not shown in the memberof attribute!).

        Then the filter string should work,
        Code:
        (&(cn=me)(memberOf=CN=dept,OU=dept,OU=group,DC=company,DC=local))
        While this one is better though,
        Code:
        (&(objectCategory=person)(ObjectClass=user)(cn=Me)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(memberOf=CN=dept,OU=dept,OU=group,DC=company,DC=local))

        - Are you sure the User-object (cn=me) is on the OU=group,... path???

        - Are you sure "me" is realy the 'common name' (as it is in the distinguest name) for this object?

        - Make sure the search scope is set to "Subtree":
        basedn: OU=group,DC=company,DC=local Include subcontainers !


        \Rems
        Last edited by Rems; 10th February 2010, 21:32.

        This posting is provided "AS IS" with no warranties, and confers no rights.

        __________________

        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts

        Comment

        Working...
        X