I'm trying to change passwords on a Win2K AD via Perl with the Net::LDAPS
and Convert::BER modules and having no luck... anyone else successful doing
this?
Here is the error I get back...
failed: 53 00002077: SvcErr: DSID-031D0A84, problem 5003 (WILL_NOT_PERFORM),
data 0 at password.pl line 38.
Here is the code I am using....
#!/umr/testbin/perl
$| =1;
use Convert::BER;
use Net::LDAPS;
$ldaps = new Net::LDAPS('srvtst01.cc.umr.edu',
port=> '636');
$UserPass="test;pass";
$UserID="Administrator";
$ADSserver='srvtst01.cc.umr.edu';
$DomainDN=" dc=test, dc=umr, dc=edu";
$UserDN="cn=$UserID, cn=users, " . $DomainDN;
$ldaps = Net::LDAPS->new($ADSserver) || die "failed: $@";
$mesg = $ldaps->bind( dn =>"$UserDN", password => "$UserPass" );
$mesg->code && die "bind failed: $mesg->error";
$tempDN = "cn=Test2 Edg, cn=Users, " . $DomainDN;
$pwd = new Convert::BER;
$pwd->encode(
STRING=>"hello",
) or die;
$mesg = $ldaps->modify(dn => $tempDN,
changes => [
replace => [ unicodePwd => "$pwd->encode"]
]
);
$mesg->code && die "failed: ", $mesg->code," ",$mesg->error;
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin