简体   繁体   English

如何在ldap(Ubuntu)中获得root dn

[英]How to get root dn in ldap (Ubuntu)

I want to know the root dn in ldap, any command? 我想知道ldap中的根dn,有什么命令吗? Here is what I found in /etc/ldap/slapd.d/cn\\=config.ldif 这是我在/etc/ldap/slapd.d/cn\\=config.ldif中找到的内容

dn: cn=config
objectClass: olcGlobal
cn: config
olcArgsFile: /var/run/slapd/slapd.args
olcLogLevel: none
olcPidFile: /var/run/slapd/slapd.pid
olcToolThreads: 1
structuralObjectClass: olcGlobal
entryUUID: 6a0e29d2-7341-1036-810b-5902d64537f7
creatorsName: cn=config
createTimestamp: 20170120094900Z
entryCSN: 20170120094900.675648Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20170120094900Z

dose that mean the root dn is 'cn=config'? 剂量意味着根dn是'cn = config'?

Many servers expose such parameters as attributes. 许多服务器将此类参数公开为属性。

You are looking for the namingContexts attribute.(Some servers also have a defaultNamingContext and/or configContext.) 您正在寻找namingContexts属性。(某些服务器还具有defaultNamingContext和/或configContext。)

You must use "base" as the search scope 您必须使用“基本”作为搜索范围

These are operational attributes, which have to be explicitly requested by name or by the + wildcard 这些是操作属性,必须按名称或+通配符明确要求

ldapsearch -LLL -h <ldaphost> -b "" -s base +

OR if server ask for credentials 或者,如果服务器要求提供凭据

ldapsearch -LLL -h <ldaphost> -s base -D "bindDN" -w "bindPassword" -b "" +

Output 输出量

dn:
structuralObjectClass: OpenLDAProotDSE
configContext: cn=config
namingContexts: dc=mydomain
namingContexts: dc=mydomain2,dc=myorg
supportedControl: 2.16.840.1.113730.3.4.9
supportedControl: 1.2.840.113556.1.4.473
supportedControl: 1.3.6.1.4.1.4203.1.9.1.1
.
.
.
supportedExtension: 1.3.6.1.4.1.1466.20037
supportedExtension: 1.3.6.1.4.1.4203.1.11.1
.
.
supportedFeatures: 1.3.6.1.1.14
supportedFeatures: 1.3.6.1.4.1.4203.1.5.1
.
.
supportedLDAPVersion: 3
supportedSASLMechanisms: LOGIN
supportedSASLMechanisms: PLAIN
entryDN:
subschemaSubentry: cn=Subschema

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM