Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
LDAP筛选器:返回多个OU中的条目_Ldap_Ou - Fatal编程技术网

LDAP筛选器:返回多个OU中的条目

LDAP筛选器:返回多个OU中的条目,ldap,ou,Ldap,Ou,假设一棵树看起来像这样 ROOT OU=ABC OU=Users and Groups OU=Users CN=USER1 CN=USER2 CN=GRP1 OU=DFG OU=Users and Groups OU=Users CN=USER3

假设一棵树看起来像这样

ROOT
    OU=ABC
        OU=Users and Groups
            OU=Users
                CN=USER1
                CN=USER2
                CN=GRP1
    OU=DFG
        OU=Users and Groups
            OU=Users
                CN=USER3
                CN=USER4
                CN=GRP2
我想从此树中检索USER1-4

我试过这个:

ou:dn:=Users
和(这似乎是不允许的):

前者只返回两个“用户”容器,而不返回其中包含的用户:

OU=Users,OU=Users and Groups,OU=ABC,ROOT
OU=Users,OU=Users and Groups,OU=DFG,ROOT
如何检索用户

谢谢

过滤器“(ou:dn:=Users)”将适用于所有符合LDAPv3的服务器,但遗憾的是Active Directory不支持该过滤器。 当服务器为AD时,您无法在单个请求中实现这一点

OU=Users,OU=Users and Groups,OU=ABC,ROOT
OU=Users,OU=Users and Groups,OU=DFG,ROOT