[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Modifying multivalue attributes with PerLDAP



$entry->replace(
            'cn'    => [ 'Chris Sheeran', 'Chris T. Sheeran', 'CT Sheeran']
                );
$entry->update($ldap);    # $ldap is reference returned from Net::LDAP->new

works for me, though still using OpenLDAP 1.2.11

----- Original Message ----- 
From: "Chris Sheeran" <chris-openldap@kastanet.org>
To: "OpenLDAP List" <openldap-software@OpenLDAP.org>
Sent: Thursday, March 08, 2001 2:35 PM
Subject: Modifying multivalue attributes with PerLDAP


> Dear y'all,
> 
> I have a problem modifying multivalue attributes for an
> existing entry.
> 
> With OpenLDAP 2.07, I can use PerLDAP to add multivalue
> attributes to a new entry, as described in the Wilcox book
> 'Implementing LDAP', e.g.
> 
> $entry->addValue("cn","Chris Sheeran");
> $entry->addValue("cn","Chris T. Sheeran");
> $entry->addValue("cn","CT Sheeran");
> 
> This works great, but I have not been able to modify these
> values in an existing entry. The Wilcox book suggests the
> following can be used:
> 
> $entry->{cn}=["Chris Sheeran","Chris T. Sheeran","CT
> Sheeran"];
> 
> but this fails on update with the following error:
> 
> LDAP error: : Invalid syntax 
> LDAP error: : additional info: multiple values provided
> 
> 
> This same code is successful with the Netscape Server. What
> must I do to update multivalue attributes in OpenLDAP?
> (using Perl, if possible?)
> 
> Thanks,
> Chris Sheeran, JAARS, Inc.
>