Active directory Active Directory可搜索筛选器

Active directory Active Directory可搜索筛选器,active-directory,ldap,Active Directory,Ldap,有没有办法查询公司的active directory服务器以获得可搜索属性列表 我是广告新手,但我知道一些常见的可搜索属性有: 通用名 名 组织单位 但是,一些公司可能会选择不使用其中一些字段,而其他公司可能会使用不在上述列表中的字段 我试图解决的问题是,为客户提供一个广告安装中的可搜索属性列表,并允许他们指定搜索过滤器,以缩小可供选择的用户或组列表。使用LDAP,您可以从rootDSE的scubschema条目中获取所有可能的属性 您首先需要进行如下查询: ldapsearch -s ba

有没有办法查询公司的active directory服务器以获得可搜索属性列表

我是广告新手,但我知道一些常见的可搜索属性有:

  • 通用名
  • 组织单位
但是,一些公司可能会选择不使用其中一些字段,而其他公司可能会使用不在上述列表中的字段


我试图解决的问题是,为客户提供一个广告安装中的可搜索属性列表,并允许他们指定搜索过滤器,以缩小可供选择的用户或组列表。

使用LDAP,您可以从rootDSE的scubschema条目中获取所有可能的属性

您首先需要进行如下查询:

ldapsearch -s base -b "" -D cn=Administrator,cn=users,dc=domain,dc=com -w 'password' -x -h 192.168.3.10 objectClass=* subschemasubentry

Which returns
dn: subschemaSubentry: CN=Aggregate,CN=Schema,CN=Configuration,DC=domain,DC=com
ldapsearch -s base -b "CN=Aggregate,CN=Schema,CN=Configuration,DC=domain,DC=com" -D cn=Administrator,dc=domain,dc=com -w password -x -h 192.168.3.11  objectclass=subschema attributetypes
然后是如下查询:

ldapsearch -s base -b "" -D cn=Administrator,cn=users,dc=domain,dc=com -w 'password' -x -h 192.168.3.10 objectClass=* subschemasubentry

Which returns
dn: subschemaSubentry: CN=Aggregate,CN=Schema,CN=Configuration,DC=domain,DC=com
ldapsearch -s base -b "CN=Aggregate,CN=Schema,CN=Configuration,DC=domain,DC=com" -D cn=Administrator,dc=domain,dc=com -w password -x -h 192.168.3.11  objectclass=subschema attributetypes
将返回所有属性。这将是所有属性的天气与否,它们是否有值。 -吉姆