Harbour Wall image

Maui Systems

Project: ldapsync.pl

Pre-Requisites:

  • Perl 5.6.1, Net::LDAP, AppConfig

License: GNU Public License (v2)

Download:

    Item Description Version
    ldapsync.pl Perl script to sync two LDAP servers 1.16
    ldapsync.conf Sample configuration file n/a

ChangeLog:

    Date Version Notes
    November 16th 2005 1.16 Added a -prime command line option, so you can force a full resync of every entry in your source LDAP server.
    September 16th 2005 1.9 Rewrite to use AppConfig and /etc/ldapsync.conf rather than hard coded config settings. Also incorporated changes from Andreas Kotes.
    May 9th 2004 1.3 Included updates from Count
    November 24th 2002 1.2 Initial release

Description:

    This script tries to keep two ldap directory trees in sync by using the 'modifyTimestamp' flag on the source server to spot new or changed records. These records are then copied to the local machine and then either inserted (for new records) or updated (for existing records) on the target server.

    Each record on the target server is then checked to see if it exists on the source server; if it doesn't, then the record is deleted from the target server. You can't get a 'modifyTimestamp' attribute on a deleted record!

Caveats:

    Tested on the Sun Microsystems Directory Server (5.1) that is bundled with Solaris 9 and then on OpenLDAP version 2.3.4 on both Solaris and Debian Linux.

    When you first run it, you may need to supply the command line option '-prime' to force all the containers to be created on the destination LDAP server. If you need to rebuild a destination server, this option is also useful for doing what it says, re-priming the destination server with all the entries from the source server.

Authors:

    marty - at - maui dot co dot uk
    Count - Andreas Kotes
www.maui-systems.co.uk ©2007 Maui Systems Ltd. All rights reserved