On Sep 26, 2008, at 8:11 AM, John W. Sopko Jr. wrote:
Here is the section of code that changes the password:
# the unicodePwd attribute is write only
$mesg = $AD->modify($dn, replace => { "unicodePwd" => $adpw });
print "mesg->code = $mesg->code() \n";
That is not calling the method.
print "resultCode = $mesg->{'resultCode'} \n";
if($mesg->{'resultCode'} != 0) {
print STDERR "\nFailed to change password for $cn exiting.\n";
print STDERR "error_text:" . $mesg->error_text . "\n";
print STDERR "server_error:" . $mesg->server_error . "\n";
print STDERR "error:" . $mesg->error . "\n";
print
exit 1;
}
Output from above section:
mesg->code = Net::LDAP::Modify=HASH(0x81d1f90)->code()
resultCode = 53
If you change the line above to
print "mesg->code = ",$mesg->code()," \n";
you should also see 53, so I doubt this is you problem.
Failed to change password for astroboy exiting.
error_text:The server is unwilling to perform the requested operation
server_error:0000052D: SvcErr: DSID-031A0FC0, problem 5003
(WILL_NOT_PERFORM), data 0
error:0000052D: SvcErr: DSID-031A0FC0, problem 5003
(WILL_NOT_PERFORM), data 0
Well it certainly looks like the server is refusing to change the
password, so I would expect the return message to signal an error
Graham.