BreakHead
BreakHead

Reputation: 10672

LDAP query issue

I am looking for a ldap query which return only Organizational Unit which are direct descendent of Domain

For example: I have ADDOMAIN01 which contains OUSales which has a child OU OUAutoMobiles. The issue is that when I search

(&(objectCategory=organizationalunit))

it returns all OUs including OUAutomobiles, and I want only top level OUs just OUSales.

Also: if I want OUs of only OUSales not of entire Domain, what should be the query?

Thanx

Upvotes: 0

Views: 313

Answers (1)

JPBlanc
JPBlanc

Reputation: 72680

When you write a SEARCH in LDAP you give :

  1. The DN of the nod where begin the search
  2. The attributes you want to retreive
  3. the filter ((&(objectCategory=organizationalunit))
  4. The deepness of your search and HERE it's OneLevel (not subtree, nor base)

With LDIFDE.EXE it's -p option

JP

Upvotes: 1

Related Questions