LDAP ユーザーのパスワードを変更したい。スクリプトは次のとおりです。
def changePassword(url,binddn,pw, newpw):
l = ldap.initialize(url)
ldap.
try:
l.protocol_version=ldap.VERSION3
l.simple_bind_s(binddn,pw)
except:
print "Error Bind in changePassword"
sys.exit(0)
old = {'userPassword':pw}
new = {'userPassword':newpw}
ldif = modlist.modifyModlist(old,new)
try:
l.modify_s(binddn,ldif)
l.unbind_s()
except:
print "error"
しかし、この関数を呼び出すと、「エラー」が発生します。私の LDAP には、パスワードを変更するときに現在のパスワードを要求するための PPolicy があります。
この PPolicy でパスワードを変更するには??
誰でも私を助けることができますか??
よろしくお願いしますダリオ