LDAP多个位置

huangapple go评论45阅读模式
英文:

LDAP multiple locations

问题

这里是否有一种方法可以添加多个位置?我需要这样做以进行测试,并在多个位置上添加LDAP过滤器。目前,我只有一个位置。我想至少测试两个位置。

<Employees FileFormat="LDAP"
             FilePath="LDAP://LDAPS.company:6367"
             Filter="(&(objectClass=user)(objectCategory=person)(givenName=*)(sn=*)(mail=*)(PhysicalDeliveryOfficeName=Test Location))"
             FilterOptions="Subtree">
英文:

Is there a way to add multiple locations here? I need to do this for testing purposes and to add ldap filter on multiple locations. Currently, I only have one location. I would like to test with at least two locations.

<Employees FileFormat="LDAP"
             FilePath="LDAP://LDAPS.company:6367"
             Filter="(&(objectClass=user)(objectCategory=person)(givenName=*)(sn=*)(mail=*)(PhysicalDeliveryOfficeName=Test Location))"
             FilterOptions="Subtree">

答案1

得分: 1

使用LDAP的“或”运算符,即|,如下所示:

Filter="(&(objectClass=user)(objectCategory=person)(givenName=*)(sn=*)(mail=*)(|(PhysicalDeliveryOfficeName=Test Location)(PhysicalDeliveryOfficeName=Test Location 2)(PhysicalDeliveryOfficeName=Test Location 3)))"

有关如何构建LDAP查询的详细信息,请参阅:Active Directory: LDAP Syntax Filters

英文:

Use the LDAP "or" operator, which is |, like this:

Filter="(&(objectClass=user)(objectCategory=person)(givenName=*)(sn=*)(mail=*)(|(PhysicalDeliveryOfficeName=Test Location)(PhysicalDeliveryOfficeName=Test Location 2)(PhysicalDeliveryOfficeName=Test Location 3)))"

More details about how to build LDAP queries is here: Active Directory: LDAP Syntax Filters

huangapple
  • 本文由 发表于 2023年2月16日 05:30:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/75465621.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定