0

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

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanx, what is LDIFDE.EXE it's -p option ?????, also if we filter with ((&(objectCategory=organizationalunit)) it will return all OUs if the DN is set to DOMAIN
LDIFDE.EXE is a tool present on Windows servers. It allow you to execute LDAP_SEARCH verbs or to import LDIF files. How do you code your search.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.