Christopher A Bongaarts wrote on 12/31/09 1:44 PM:
In the immortal words of Sheahan, John:
My script is successfully creating AD and Exchange accounts but I'm having
trouble setting the password.
I am setting these attributes:
'userPassword' => 'password',
'userAccountControl' => '66048', # activates
the account and sets the password to never expire
For some reason, the password is not being set but my script does not throw an
error.
Not sure why you're not seeing an error, but normally the userPassword
needs special encoding (UTF16 and quotation marks) and has other rules
associated with it (only settable on an SSL connection, e.g.) - search
the list archives/web for the details.
you can see one implementation of setting a AD password, based on the list
archives, in Net::LDAP::Class::User::AD on CPAN. Look at the source for the
password() method and the private methods for encoding/decoding the string.
--
Peter Karman . http://peknet.com/ . pe...@peknet.com