Hello together,
I try to modify the value of an attribute. This attribute is has multiple
values.
the following code is what i do:
----------- snip ----------
$ldap = Net::LDAP->new ( $ldaphost ) or die "$@";
$mesg = $ldap->bind ( "$ldapuser",
password => "$ldappassword",
version => 3);
foreach $tmp (keys %add) {
$entry = $ldap -> modify ( "$tmp",
add=> [ 'member' => $username ] );
}
foreach $tmp (keys %del) {
$entry = $ldap -> modify ( "$tmp",
delete=> [ 'member' => $username ] );
}
$entry->code && warn "failed to add entry: ", $entry->error ;
$mesg = $ldap->unbind;
----------- /snip ----------
Well, the part with modify/add is working correctly
but if i want to modify/delete the same part again i get the following error:
failed to add entry: 00000057: LdapErr: DSID-0C090A85, comment: Error in
attribute conversion operation, data 0, vece^@ at zzlib-html.pl line 445,
<DATA> line 228.
the ^@ is not ascii but seems to by some control character.
$tmp by the way is not 0 but:
CN=XXX-NEWS-XXX,OU=XXX-XXX,OU=DXXX,OU=XXXXX,DC=XXX,DC=XXX,DC=de
and also $username is not empty either.
Well, at least without the X ;), but it is the correct DN where $username,
and the DN of $username is also correct, should be remove out of $tmp (i
got it by a print, well, data there is definitivly no empty data
or could it be that the error occures if "members" would be empty?
thanks,
anniyka