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

Re: ldapmodify versus ldapadd



ldapadd v ldapmodify effects how the LDIF is interpreted.  ldapadd
assumes the entry record format is provided, ldapmodify assumes the
change record format is used.

One should avoid using the -r option.  It's a left over from old
code and will soon go away.

At 01:57 AM 2001-08-27, Paul Gillingwater wrote:
>Hi there,
>
>I'm a little puzzled by the behaviour of ldapmodify versus ldapadd.  AFAIK, 
>these are the same program, with the name determining which command line 
>options are used.  For example, ldapadd invokes the -a flag, while ldapmodify 
>invokes the -r flag.
>
>What puzzles me is how can I do a REPLACE and ADD together.  For example, I 
>have a set of data, some of which is new and some is old but changed.  The 
>individual LDIF records are exported from non-LDAP systems, and therefore do 
>not have individual add/modify/delete commands embedded.  I would be grateful 
>for any advice on how I can ask OpenLDAP to add records which aren't there, and 
>modify records which aren't.
>
>If I try ldapadd with -r option, I get the error that the record already exists 
>(which is true for some of them of course.)  Essentially, I expect that the -r 
>and -a flags are mutually exclusive -- but the man page syntax doesn't reflect 
>that.
>
>What I'm afraid I have to do is to delete all the old records first, then add 
>them all in again.  Surely there's a better way?
>
>Thanks in advance for advice!
>
>
>*********************************
>        Paul Gillingwater
>        Managing Director
> CSO Lanifex Unternehmensberatung 
> & Softwareentwicklung G.m.b.H.
>      NEW BUSINESS CONCEPTS
>
>E-mail:  paul@lanifex.com
>Teleph:  +43(1)2198222-0
>Fax:     +43(1)2198222-11
>Mobile:  +43(699)1922 3085
>Webhome: http://www.lanifex.com/
>Address: Praterstrasse 60/1/2 
>         A-1020 Vienna, Austria
>*********************************