[ejabberd] FYI: Synchronisation script LDAP→MUC

Dominik George nik at naturalnet.de
Mon Jan 4 16:38:52 MSK 2016


for the record, here is a script that does the following:

 1. Find all groups in an LDAP directory that have a special attribuite set, 
    marking them as having a chatroom,
 2. Create a MUC with their name and description if it does not exist yet,
 3. Set some basic room options
 4. Synchronise member affiliations with the LDAP group members
 5. Set owner affiliation on LDAP group owners
 6. Add a bookmark for the room to all members' rosters if they do not
    have it yet
 7. Forge a room invitation after bookmark creation

Together with mod_shared_roster_ldap, we have now almost complete workgroup 
mamangement through LDAP.

The code is quite site-specific and makes a few assumptions:

 * LDAP groups have both member: and memberUid: entries, which are in 
   sync (our LDAP maintenance script ensures that)
 * The mksh shell and the assoldap toolkit are available

I do not know if it is of any use to anyone, but here it is.


LDAP toolkit:


PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17  FD26 B79A 3C16 A0C4 F296

Dominik George · Mobil: +49-151-61623918

Teckids e.V. · FrOSCon e.V. · OpenRheinRuhr e.V.
Fellowship of the FSFE · Piratenpartei Deutschland
Opencaching Deutschland e.V. · Debian Contributor

LPIC-3 Linux Enterprise Professional (Security)

More information about the ejabberd mailing list