From: Lars T. <la...@th...> - 2002-04-16 06:43:00
|
I'm not quite clear on your problem. Using 'add' should just add another value to the list, regardless of what is there already, and without touching previous data. If you on the other hand mean 'replace', here's an earlier discussions from this list: --cut-- > The semantics of LDAP modify's 'replace' replaces all values of an > attribute with a new set of values. > > If you want to remove just one value, use the modify 'delete' value > option. > You can use the 'delete' and 'add' options in the same modify operation > to > get an atomic update of a single value. --cut-- An example: --cut-- $ldap->modify( $dn, changes => [ delete => [ telephoneNumber => ['911']], # delete phone number 911 add => [ telephoneNumber => ['112']], # add phone number 112 ] ); --cut-- /Lars ----- Original Message ----- From: "Lars Skjærlund" <la...@sp...> To: <per...@li...> Sent: Tuesday, April 16, 2002 8:13 AM Subject: How to add a value to a multivalued attribute Hi list, I cannot figure out how to add a new value to a multivalued attribute. In my case, I want to add a couple of entries to an ACL (access control list) in Novell NDS/eDir. Typically, there'll be a lot of other values already, so I cannot (well, I do not want) to make a simple replace. I think I've tried all the examples I've been able to find in the documentation, but I only get a bunch of varying error messages as result. Does anyone have a code snippet that works? Regards, Lars Lars Skjærlund, Network Consultant, Spinn International ApS Bukkeballevej 30, 2960 Rungsted Kyst, Denmark Tel.: +45 70 25 88 10, Fax: +45 70 25 88 44 Mail: la...@sp... Web: http://www.spinn.dk -- |