hi
please some one help i am new to python
i want to perform a modify operation on the cn attribute of th dn
"mail=11...@nd...,dc=ndd,dc=com"
for that my script is
#!/usr/bin/python
import getpass
import _ldap
l.simple_bind_s(login_dn,login_pw)
try:
dn="mail=11...@nd...,dc=ndd,dc=com"
print "adding ",repr(dn)
l.modify_s(dn,_ldap.MOD_REPLACE,[('cn',["fgs"])])
except _ldap.LDAPError:
pass
l.unbind()
when i run the script i get the following error
adding 'mail=11...@nd...,dc=ndd,dc=com'
Traceback (innermost last):
File "mod.py", line 19, in ?
l.modify_s(dn,_ldap.MOD_REPLACE,[('cn',["fgs"])])
TypeError: function requires exactly 2 arguments; 3 given
pl tell me the correct syntax of how i should do ir
ritu
|