Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Using ldifdiff.pl and ldapmodify to syncronise LDAP directories
Dear list,

I'm trying to cause a 'slave' LDAP directory (in this case, the
Embedded LDAP server in WebLogic 8.1sp5) to become the same as a
'primary' directory (also in WL 8.1sp5).

The approach taken so far is to perform an ldapsearch on both, then
use ldifdiff.pl (from the LDAP perl's contrib directory) and finally
use ldapmodify (testing with OpenLDAP's, but will be using HP-UX's) to
import the changes.

We use ldifsort.pl before ldifdiff.pl, as per the recommendation in
ldifdiff.pl.

Our problem is that this process creates an LDIF file which contains
actions we need to be performed in a particular order, but they are
not in that order yet. For example, the output of ldifdiff.pl might
be:

dn: ou=EPredicate,ou=newrealm,dc=examples
changetype: add
objectclass: organizationalUnit
objectclass: top
ou: EPredicate

dn: ou=newrealm,dc=examples
changetype: add
objectClass: organizationalUnit
objectClass: top
ou: newrealm

but in order for ldapmodify to be successful, the file would need to
be:

dn: ou=newrealm,dc=examples
changetype: add
objectClass: organizationalUnit
objectClass: top
ou: newrealm

dn: ou=EPredicate,ou=newrealm,dc=examples
changetype: add
objectclass: organizationalUnit
objectclass: top
ou: EPredicate

A similar problem happens with delete, which need to be depth-first.

Is there a straight forward way to order the file so the adds are
depth-last, and then the deletes are depth-first? I would expect this
to be a common problem, so it's possible that I'm misunderstanding
some part.

Any advice gratefully received!

Thank you,

Nick

Report this thread to moderator Post Follow-up to this message
Old Post
Nicholas Piper
05-09-08 01:34 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

LDAP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:36 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.