In the immortal words of Dan Swanson:

> I have a Perl script using Net::LDAP to create new accounts in
> Microsoft Active Directory. Everything is working well except the
> password change (see output below). I am attempting to perform a
> ldap->modify(replace) which works well for other attributes, but not
> the password. I am getting a LDAP_UNWILLING_TO_PERFORM error. Has
> anyone encountered this error before?

AD requires that the connection be secure (LDAPS) and uses a specific
format for the password.  If your password is in $password, this
should do it for you:

  $newpassword = pack "v*", unpack "C*", qq("$password");

(It must be enclosed in literal double quotes, then put in UTF-16(?)
form.)

%%  Christopher A. Bongaarts  %%  [EMAIL PROTECTED]       %%
%%  Internet Services         %%  http://umn.edu/~cab  %%
%%  University of Minnesota   %%  +1 (612) 625-1809    %%

Reply via email to