[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: newbie: ADD vs. MODIFY
On Fri, 1 Sep 2000, Ron Newman wrote:
> ldapadd chokes if the entry exists already,
> ldapmodify is meant for existing entries.
>
> So to add a new entry I first search the entire database to see if it
> exists, then call either ldapadd or ldapmodify accordingly? This is very
> slow, but I understand that LDAP is meant for fast recall, not fast
> entering.
ldapmodify -a should also add entries (though I should think it would
choke if it already existed, too). If you are putting this in a script,
the -a could simplify things.*
If you need to add a lot of people, you probably want to look at the ldif
format and do all your searches first, then a big ldapmodify/add. If you
only need to add one person every once in a while, searching first doesn't
seem like a big hardship. (Of course, we've only got about 150 entries,
so searches are quick.)
Lillith Lerien
Systems Administrator e: lillith@xpresschex.com
XpresscheX, Inc. v: 505-998-3141 x3712
* Such as this perl-like pseudocode;
$a = "";
if (`ldapsearch`) {
$a = -a;
}
ldapmodify $a blah blah blah;