[Samba] Samba AD DC: Keeping LDAP content in VCS

Lorenz Schori lo at znerol.ch
Sun Jul 25 11:10:05 UTC 2021


I am unable to find a simple tool which fulfils the following

	As a directory administrator, I'd like to maintain the
	structure of a LDAP directory (Groups / OUs) over time using
	flat files checked into a VCS (version control system).

What I'm looking for is basically the equivalent of database schema
migrations[1] as implemented in many OSS web frameworks but for LDAP
(E.g., Rails: rake db:migrate, Django: django-admin migrate, etc.).

In a very basic implementation such a tool would take a directory full
of ldif files named according to the following scheme:
YYYY-MM-DD-NNN-whatever-{UP,DOWN}.ldif (where NNN is a serial and UP or
DOWN denote whether the file should be applied when installing and
removing a migration respectively). When run the tool would check the
last version applied to the LDAP directory. After that it figures out
which migrations need to be applied and then runs ldapmodify once for
each file in the proper sequence.

If you know such a tool, then please point me towards it.


1) https://en.wikipedia.org/wiki/Schema_migration

More information about the samba mailing list