Re: Setting LDAP_SERVER_PERMISSIVE_MODIFY_OID to allow empty values in AD
Graham Barr <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.ldap |
|---|---|
| Message-ID | <[email protected]> |
On Dec 2, 2008, at 8:20 AM, A. Farber wrote:
> Hello,
>
> I have a script which reads phone numbers from a CSV file
> and stores them in Active Directory (w2k3), so that you can
> find a user phone number in the address book of Exchange.
>
> I get error messages:
> "comment: Error in attribute conversion operation, data 0, vece"
> which I can get rid of only if I set every new empty value
> to some string, for example to "n/a".
>
> After some searching I've found a suggestion to set
> LDAP_SERVER_PERMISSIVE_MODIFY_OID so that
> AD does not prevent me from emptying empty values:
> http://msdn.microsoft.com/en-us/library/aa366984.aspx
>
> Does anybody please know how to set it in Net::LDAP?
> And what value should I use, "1.2.840.113556.1.4.1413"?
Try,
use constant LDAP_SERVER_PERMISSIVE_MODIFY_OID
'1.2.840.113556.1.4.1413';
$mod = $ldap->modify($entry,
control => [ { type => LDAP_SERVER_PERMISSIVE_MODIFY_OID } ],
replace => {
homePhone => $href->{HOME},
mobile => $href->{MOBILE},
facsimileTelephoneNumber => $href->{FAX}
}
);
Graham.