I am having NO luck doing this... I'm hoping to find someone who has SUCCESSFULLY done this. I get the following error when I try:
failed: 19 0000216C: AtrErr: DSID-031D0A99, #1:
0: 0000216C: DSID-031D0A99, problem 1005 (CONSTRAINT_ATT_TYPE)
+, data 0, Att 9005a (unicodePwd)
at password.pl line 50
Here is the code I am using:
Thanks for any suggestions/help you could provide.
#!/umr/testbin/perl
$| =1;
use Convert::BER;
use Net::LDAPS;
$ldaps = new Net::LDAPS('srvtst01.cc.umr.edu',
port=> '636');
$UserPass="*******";
$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\"",
# STRING=>"\x00\"\x00h\x00e\x00l\x00l\x00o\x00\"",
) or die;
$pw = $pwd->buffer;
$mesg = $ldaps->modify(dn => $tempDN,
changes => [
replace => [ unicodePwd => '$pw' ]
]
);
$mesg->code && die "failed: ", $mesg->code," ",$mesg->error;
2001-04-06 Edit by Corion : Removed plaintext password, added CODE tags to error message.