歡迎您光臨本站 註冊首頁

配置openldap 出現 ldap_bind: Invalid credentials (49) 問題

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

配置openldap 出現 ldap_bind: Invalid credentials (49) 問題

配了2個星期的OPENldap   始終停在 ldap_bind: Invalid credentials (49)這個錯誤上,google baidu 了無數,始終解決不了,請各位大俠在這個弱智的問題上指點一二吧

系統  fedora 12   

配置步驟如下
# yum -y install openldap*

# create password
# slappasswd -s password -h {MD5}
# (1) remember it
{MD5}************************

# 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

# vi /etc/openldap/ldap.conf

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

# vi /etc/ldap.conf

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

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

Add initial information  
# 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


# ldapadd -h localhost -x -D "cn=Manager,dc=server-linux,dc=info" -W -f base.ldif



就這些步驟 我反覆配置了不下5次,系統也重裝了2便,就是不行
每次都報 ldap_bind: Invalid credentials (49)  這個錯誤


請各位幫忙看看
《解決方案》

你是看看不要使用  /etc/rc.d/init.d/ldap start 啟動服務,使用 slapd 啟動服務看看。然後這時候使用命令添加是否還會報這個錯誤。
《解決方案》

是不是啟動了系統自帶的LDAP服務呀?
《解決方案》

ldapadd
-x         Simple authentication
用這個選項
《解決方案》

如果你不幸得到"ldap_bind: Invalid credentials (49)"錯誤,就表示你要麼給出了錯誤的"cn="條目,要麼給出了錯誤的密碼。
所以簡化你的ldif文件吧,寫個最最簡單的ldif文件吧。然後注意你的命令行,你用了-x。那應該有提示,讓你輸入密碼的吧。你那個密碼搞複雜了,用明文先測試一下應該沒問題的吧。

總之一句話,簡化你的測試數據。這樣找問題可能簡單點。:emn12:
《解決方案》

修改/etc/openldap/slapd.conf  
rootpw     123456  注:行首不能有空格,屬性於值間隔用tab鍵隔開
可以試一下。我就是在這裡卡了很久才找出問題所在。

[火星人 ] 配置openldap 出現 ldap_bind: Invalid credentials (49) 問題已經有3935次圍觀

http://coctec.com/docs/service/show-post-17762.html