How to change the password of a LDAP entry as LDAP administrator

Guruprasad lgp171188 at gmail.com
Thu Jan 15 10:51:25 CET 2009


Guruprasad wrote:
> Hi all,
> I am new to this Python-LDAP API and am currently learning and working 
> on it. I, the LDAP admin, want to set the password of a LDAP user after 
> binding as the admin user. I came across passwd_s() method which can be 
> used to change the user password, but requires the old password too. As 
> an admin, I should be able to reset the LDAP passwords of users whose 
> current passwords I do not know. Is there a way to do this?
> 
> Thanks in advance.
> 
> Regards,
> Guruprasad

I figured it out. When I bind as LDAP admin and want to change the 
password of another DN, I just have to give oldpasswd=None. For example:

ldapobj.passwd_s("DN to delete",None,"newpassword")

Thank you.

Regards,
Guruprasad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lgp171188.vcf
Type: text/x-vcard
Size: 145 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20090115/706ce6da/attachment.vcf>


More information about the python-ldap mailing list