ldapsearch 命令

12月 3, 2017 |

ldapsearch -x -s base -b "cn=subschema" [*|+|ldapSyntaxes|matchingRules|matchingRuleUse|attributeTypes|objectClasses]

ldapsearch命令必须在同一行上
-x 使用简单的认证
-s base 查询的范围为当前级, -s sub 为当前及下面的子元素, -s one 为当前的下一级
参考http://www.idevelopment.info/data/LDAP/LDAP_Resources/SEARCH_Setting_the_SCOPE_Parameter.shtml或者
https://www.centos.org/docs/5/html/CDS/ag/8.0/Finding_Directory_Entries-Using_ldapsearch.html

-b 指定查询的相对节点
cn=subschema下面存放了很多系统相关的信息,比如定义的attributeTypes,objectClasses,ldapSyntaxes(语义也就是数据类型,定义attributeType时使用)

Posted in: Linux

Comments are closed.