问题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 ~]#