develooper Front page | perl.ldap | Postings from January 2010

Re: [Net::LDAP] Re: How To Set AD Password

Thread Previous | Thread Next
From:
Peter Karman
Date:
January 1, 2010 06:19
Subject:
Re: [Net::LDAP] Re: How To Set AD Password
Message ID:
4B3E0481.30804@peknet.com
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/  .  peter@peknet.com

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About