title: Using DN in Search Filter
body: <p>In my LDAP Client program sometimes I have to include the DN value within the search filter. But this DN is changing frequently and every I have to change this filter in my code.</p>
  
  <p>When I googled it for that I got something like this</p>
  
  <p>Suppose you want to pull all users of ObjectType = Person from the R&amp;D and HR ous, but not any users from Marketing and PM. The filter would be:</p>
  
  <pre><code>(&amp;(objectClass=person)(|(ou:dn:=ResearchAndDevelopment)(ou:dn:=HumanResources)))
  </code></pre>
  
  <p>Can anybody explain this more in detail?</p>