主题: 关于0.6.1升级0.7.0的脚本的问题

问题1:
修改updateLDAPValues_061_to_070.py时 bind_pw = 'passwd' 是否需要修改 如需要改为何值
uri = 'ldap://127.0.0.1:389'
basedn = 'o=domains,dc=iredmail,dc=org'
bind_dn = 'cn=vmailadmin,dc=iredmail,dc=org'
bind_pw = 'passwd'

问题2:执行脚本时出现一下提示:
[root@mail ~]# python updateLDAPValues_061_to_070.py
* Connecting to LDAP server: ldap://127.0.0.1:389
Traceback (most recent call last):
  File "updateLDAPValues_061_to_070.py", line 22, in ?
    conn.bind_s(bind_dn, bind_pw)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 213, in bind_s
    return self.result(msgid,all=1,timeout=self.timeout)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 428, in result
    res_type,res_data,res_msgid = self.result2(msgid,all,timeout)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 432, in result2
    res_type, res_data, res_msgid, srv_ctrls = self.result3(msgid,all,timeout)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 438, in result3
    ldap_result = self._ldap_call(self._l.result3,msgid,all,timeout)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 96, in _ldap_call
    result = func(*args,**kwargs)
ldap.INVALID_CREDENTIALS: {'info': '', 'desc': 'Invalid credentials'}
[root@mail ~]#

回复: 关于0.6.1升级0.7.0的脚本的问题

经确认 不存在/usr/lib/python2.4/site-packages/ldap/目录

回复: 关于0.6.1升级0.7.0的脚本的问题

安装 python-ldap-2.3.13-2.ired.i386.rpm 之后依然这样

回复: 关于0.6.1升级0.7.0的脚本的问题

服务器是 CenOS5

回复: 关于0.6.1升级0.7.0的脚本的问题

无夜游民_ 写道:

ldap.INVALID_CREDENTIALS: {'info': '', 'desc': 'Invalid credentials'}

你的 bind dn 或 bind password 是错误的。