LDAP Search Filter for users not in specific OU

纵饮孤独 提交于 2021-01-29 10:17:49

问题


I am trying to search for all users not in a specific OU.

(&(objectCategory=person)(!(ou=Old-users))) is not working, but is essentially what I am looking for. All people NOT in Old-users

I have tried numerous combinations and nothing is working as expected.


回答1:


ou is not part of the entries, but part of the DN (i.e. the path to the entry).

Some servers that are compliant with the LDAPv3 specifications will support filtering within the DN part, using a notation like this: (ou:dn:=old-users).

Active Directory doesn't (and based on the "objectCategory" attribute in the filter, I'm guessing you are using AD).



来源:https://stackoverflow.com/questions/57434811/ldap-search-filter-for-users-not-in-specific-ou

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!