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

adding extra attributes without removing current values

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, 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,