我正在尝试通过整个广告执行过滤的ldapsearch。但是,当我将basedn设置为域时,即使过滤器不匹配(我要测试的内容),我也会从查询到其他“分区”的“refldap”引用响应。例如 ldapsearch -LLL -h 127.0.0.1 -b "dc=ad-test,dc=local" -D "cn=ldapproxy,cn=users,DC=ad-test,DC=local" -w password (&(pwmResponseSet=*)(samaccountname=notestuser))" dn# refldap://ForestDnsZones.ad-test.local/DC=ForestDnsZones,DC=ad-test,DC=local# refldap://DomainDnsZones.ad-test.local/DC=DomainDnsZones,DC=ad-test,DC=local# refldap://ad-test.local/CN=Configuration,DC=ad-test,DC=local有没有办法防止这些引荐条目/返回?(我正在尝试将输出写入标志文件,然后测试其大小...通过虚假条目,即使过滤查询失败,我仍然会得到文件大小 0)我确实考虑过查询GC,但是我想要的属性未存储在此处(并且我不想添加它!)有任何想法吗?谢谢大卫 (adsbygoogle = window.adsbygoogle || []).push({}); 最佳答案 我以为我找到了可以使用的替代方法。如果我在``ldap模式''(https://technet.microsoft.com/en-us/library/cc754232.aspx)中使用RSAT dsquery.exe工具,那似乎可以解决问题,即dsquery * domainroot -filter "(&(pwmResponseSet=*)(samaccountname=%USERNAME%))"我希望这可以帮助同一条船上的人干杯大卫关于active-directory - ldapsearch整个事件目录,无refldap返回,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32989159/ (adsbygoogle = window.adsbygoogle || []).push({});