免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 36866 | 回复: 5
打印 上一主题 下一主题

[ldap] 配置openldap 出现 ldap_bind: Invalid credentials (49) 问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-03-09 17:12 |只看该作者 |倒序浏览
配了2个星期的OPENldap   始终停在 ldap_bind: Invalid credentials (49)这个错误上,google baidu 了无数,始终解决不了,请各位大侠在这个弱智的问题上指点一二吧

系统  fedora 12   

配置步骤如下
[root@dlp ~]# yum -y install openldap*

# create password
[root@dlp ~]# slappasswd -s password -h {MD5}
# (1) remember it
{MD5}************************

[root@dlp ~]# vi /etc/openldap/slapd.conf

# line 89: specify domain name
suffix   "dc=server-linux,dc=info"

# line 91: specify domain name
rootdn   "cn=Manager,dc=server-linux,dc=info"

# line 97: add password that is set in (1)
rootpw   {MD5}************************

# add these lines at the bottom
access to attrs=userPassword
    by self write
    by dn="cn=Manager,dc=server-linux,dc=info" write
    by anonymous auth
    by * none

access to *
    by dn="cn=Manager,dc=server-linux,dc=info" write
    by self write
    by * read

[root@dlp ~]# vi /etc/openldap/ldap.conf

# line 15: make valid and specify domain name
BASE   dc=server-linux, dc=info

[root@dlp ~]# vi /etc/ldap.conf

# line 20: specify domain name
base dc=server-linux,dc=info

[root@dlp ~]# cd /usr/share/doc/openldap-servers-2.4.15
[root@dlp openldap-servers-2.4.15]# cp DB_CONFIG.example /var/lib/ldap/DB_CONFIG
[root@dlp openldap-servers-2.4.15]# cd
[root@dlp ~]# /etc/rc.d/init.d/ldap start
Starting slapd:[  OK  ]
[root@dlp ~]# chkconfig ldap on

[2] Add initial information  
[root@dlp ~]# vi base.ldif

# crate the file like below
dn: dc=server-linux,dc=info
objectClass: dcObject
objectClass: organization
o: server-linux Organization
dc: server-linux


dn: cn=Manager,dc=server-linux,dc=info
objectClass: organizationalRole
cn: manager


dn: ou=People,dc=server-linux,dc=info
objectClass: organizationalUnit
ou: People


dn: ou=Group,dc=server-linux,dc=info
objectClass: organizationalUnit
ou: Group


[root@dlp ~]# ldapadd -h localhost -x -D "cn=Manager,dc=server-linux,dc=info" -W -f base.ldif



就这些步骤 我反复配置了不下5次,系统也重装了2便,就是不行
每次都报 ldap_bind: Invalid credentials (49)  这个错误


请各位帮忙看看

论坛徽章:
0
2 [报告]
发表于 2010-03-10 15:24 |只看该作者
你是看看不要使用  /etc/rc.d/init.d/ldap start 启动服务,使用 slapd 启动服务看看。然后这时候使用命令添加是否还会报这个错误。

论坛徽章:
0
3 [报告]
发表于 2010-03-23 15:32 |只看该作者
是不是启动了系统自带的LDAP服务呀?

论坛徽章:
0
4 [报告]
发表于 2010-04-30 15:55 |只看该作者
ldapadd
-x         Simple authentication
用这个选项

论坛徽章:
0
5 [报告]
发表于 2010-05-07 18:02 |只看该作者
如果你不幸得到"ldap_bind: Invalid credentials (49)"错误,就表示你要么给出了错误的"cn="条目,要么给出了错误的密码。
所以简化你的ldif文件吧,写个最最简单的ldif文件吧。然后注意你的命令行,你用了-x。那应该有提示,让你输入密码的吧。你那个密码搞复杂了,用明文先测试一下应该没问题的吧。

总之一句话,简化你的测试数据。这样找问题可能简单点。

论坛徽章:
0
6 [报告]
发表于 2010-05-26 17:59 |只看该作者
修改/etc/openldap/slapd.conf  
rootpw     123456  注:行首不能有空格,属性于值间隔用tab键隔开
可以试一下。我就是在这里卡了很久才找出问题所在。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP