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

ldapmodify command question...

Is it possible to do the following:

I have a couple hundred DN's in an ldif file that look like:

dn: uid=bob,o=domain.com
uid: bob
mail: bob@domain.com
cn: Bob Jones

The question is some of the dn's in my ldif file are new and do not exist in LDAP server (so I add them with -x -a -f). Some entries however, do already exist in LDAP - but I want to get rid of what is currently in LDAP and force the ADD of what is in the ldif file. The entry in ldif might be identical to what is in LDAP, or it might be different - either way, the data in the ldif file is superior.

Is it possible to do all of this via a single ldapmodify command against the single ldif file. I really dont want to make a script that enforces some logic like, if the dn is already present, delete it, then add what is in ldif, and so on.

Thanks in advance. -John