[python-ldap] qeustion searching underlying OU with python-ldap

Michael Ströder michael at stroeder.com
Sat Nov 26 10:54:14 EST 2016

Joey Hendricks wrote:
> I have a qeustion on how to modify a password of a AD user.
> I have been doing it until now this way:
> [..]
> But i want to be able to modify a user password without specifying the location
> of the user, i just want it to search the entire AD for that user.
> What would be the best way to achieve  this?

You have to provide the full DN of the user's entry when modifying it.

You can simply search the user entry first with a filter like


and then use its DN.

Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3829 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20161126/c23243a1/attachment.bin>

More information about the python-ldap mailing list