Ldap 如何在开放ds上创建基本dn

Ldap 如何在开放ds上创建基本dn,ldap,opends,Ldap,Opends,我正在使用OpenDS2.2作为LDAP服务器,目前我想创建一个基本dn,如dc=esamurdhiint,dc=lk 我创建了下面的ldif文件并运行,我发现有错误 我的ldif文件 dn: dc=esamurdhiint,dc=lk objectClass: domain objectClass: top dc: esamurdhiint 我的命令id ldapmodify -h 10.136.78.27 -p 1389 -D "cn=admin,ou=system" -w changei

我正在使用OpenDS2.2作为LDAP服务器,目前我想创建一个基本dn,如
dc=esamurdhiint,dc=lk
我创建了下面的ldif文件并运行,我发现有错误

我的ldif文件

dn: dc=esamurdhiint,dc=lk
objectClass: domain
objectClass: top
dc: esamurdhiint
我的命令id

ldapmodify -h 10.136.78.27 -p 1389 -D "cn=admin,ou=system" -w changeit -a  -f /tmp/ldap.ldif

" adding new entry "dc=esamurdhiint,dc=lk"
ldap_add: No such object (32)
    additional info: The provided entry dc=esamurdhiint,dc=lk cannot be added because its suffix is not defined as one of the suffixes within the Directory Server ".
/dsconfig set backend prop--后端名称userRoot--添加基本dn:dc=
--主机名localhost--端口4444--bindDN cn=admin,ou=system--bindPassword changeit
--trustAll--noPropertiesFile--no提示符

正如Roshan所指出的,您需要首先配置后缀(基本dn),并指定它将位于哪个数据库后端。
您可以选择将后缀添加到默认后端(userRoot)或新后端。

Perfect。之后只需创建上下文条目,一切都完成了!:-)
./dsconfig set-backend-prop --backend-name userRoot --add base-dn:dc=<<esamurdhiint,dc=lk>>
--hostname localhost --port 4444 --bindDN cn=admin,ou=system --bindPassword changeit
--trustAll --noPropertiesFile --no-prompt