ldap .passwd method, need help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sells, Fred

    #1

    ldap .passwd method, need help

    I've got the python-ldap version 2.0.11 with python 2.4 under Linux

    I've got the ldap stuff working for groups, but now I'm trying to use it to
    change a user password. I get a return of 2 and no error messages but it
    does not change ldap.

    I've tried it with uid = 'joeblow' and with oldpw=whatever it was with the
    same result.

    Anyone know what I'm missing?

    class LdapUser:
    def __init__(self, uri=uri, binddn=BINDDN, password=""):
    self.ldap = ldap.initialize (uri)
    self.ldap.simpl e_bind(binddn, password)

    def chg_pw(self,uid ,oldpw,newpw):
    print self.ldap.passw d_s(uid,oldpw,n ewpw)


    if __name__=="__ma in__":
    Ldap = LdapUser(passwo rd="secret")
    Ldap.chg_pw("ui d=joeblow,ou=ab c,ou=def,dc=ghi ,dc=org","", "new.pass")


    ---------------------------------------------------------------------------
    The information contained in this message may be privileged and / or
    confidential and protected from disclosure. If the reader of this message is
    not the intended recipient, you are hereby notified that any dissemination,
    distribution or copying of this communication is strictly prohibited. If you
    have received this communication in error, please notify the sender
    immediately by replying to this message and deleting the material from any
    computer.
    ---------------------------------------------------------------------------
Working...