加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

openldap – 在ldap根DN中记录问题

发布时间:2020-12-15 22:36:53 所属栏目:安全 来源:网络整理
导读:我几乎被困在以下问题的一天, 我使用apt-get install slapd安装了LDAP 并使用以下配置: include /etc/openldap/schema/core.schemainclude /etc/openldap/schema/cosine.schemainclude /etc/openldap/schema/inetorgperson.schemainclude /etc/openldap/sch
我几乎被困在以下问题的一天,

我使用apt-get install slapd安装了LDAP

并使用以下配置:

include     /etc/openldap/schema/core.schema
include     /etc/openldap/schema/cosine.schema
include     /etc/openldap/schema/inetorgperson.schema
include     /etc/openldap/schema/nis.schema


allow bind_v2
loglevel    0
moduleload  back_sbdb.la

database    bdb
suffix      "dc=test,dc=nl"
rootdn      "cn=Directory Manager,dc=test,dc=nl"
rootpw      test

directory   /var/lib/ldap

index   objectClass                     eq
index   userPassword                        eq,pres
index   givenName,mail,mobile,sn,title,cn,description       eq,sub,pres
index   displayName                     eq,pres
index   postalAddress,facsimileTelephoneNumber          pres

access to *
  by self write
  by * read

然后我尝试使用绑定

ldapsearch -D cn=Directory Manager,dc=nl -w test

但我仍然收到错误ldap_bind:证书无效(49)

任何人都有任何想法或线索可能是什么?

谢谢你

解决方法

尝试使用引号,如;

ldapsearch -D "cn=Directory Manager,dc=nl" -w test

目录管理器中的空格字符可能会导致问题.

编辑:另外,你确定你不需要-h -p参数吗?

-h     The host name of the directory server
-p     The port number of the directory server

Edit2:弄清楚出了什么问题.您正在slapd配置文件中使用未加密的rootpw.您应该使用由slappasswd工具输出创建的加密密码.在特殊情况下,这可能会导致问题.

查看此链接了解详细信息:http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-ldap-quickstart.html

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读