Changing password as administrator

Michael Ströder michael at stroeder.com
Tue Oct 6 14:17:40 CEST 2009


Avinash Sultanpur wrote:
> 
> What is the equivalent of running the below command in python-ldap?
> 
>     ldappasswd -x -D <root_dn> -w <root_pw> -s secret_password \
>         uid=user000,ou=People,dc=example,dc=com

ldap_conn = ldap.initialize(...)
ldap_conn.simple_bind_s('<rootdn>,'<rootpw>')
ldap_conn.passwd_s('uid=user000,ou=People,dc=example,dc=com',None,'<newpassword>')

Ciao, Michael.



More information about the python-ldap mailing list