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

Re: adding extra attributes without removing current values

charlie derr wrote:
Hi all,
        My question is probably best explained with a (simplified,

Let's say I have an entry:

dn: uid=someperson,ou=people
objectClass: person
uid: someperson
someAttribute: value1

If I now create a file called simple.ldif consisting of just two lines:

dn: uid=someperson,ou=people
someAttribute: value2

and then execute:

ldapmodify -f simple.ldif

the result is that value2 does get added, but value1 disappears. I've
looked through the ldapmodify man page and also experimented with the php function ldap_modify() but haven't discovered a way to do this simply. Obviously I could first do an ldapsearch, select any existing value(s), append the new one I wish to add, and then perform my ldapmodify,

sure, why not? You could also do "man ldapmodify" and have a look at the INPUT FORMAT section.

but that seems unnecessarily complex for something that I would think is a fairly common use case. Is there an easy way to accomplish this?

        Thanx very much in advance,

-- Dr. Pierangelo Masarati | voice: +39 02 2399 8309 mailto:pierangelo.masarati@polimi.it | fax: +39 02 2399 8334 http://www.aero.polimi.it/~masarati Dip. Ing. Aerospaziale Politecnico di Milano, via La Masa 34, 20156 Milano, Italy