I'm running an OpenLDAP 2.4.44 with the module back_ldap as LDAP Proxy for MS-AD-Servers (see for details: openLDAP as proxy to Active Directory).
Now I need to add the schemata from AD-Server to the OpenLDAP-Server and I have exported the schemata from a MS-AD-Server with ldapsearch into a ldif-file (see for details: How can I fetch schema information from the server?).
Now I need to convert the ldif-format to a schema-format for OpenLDAP slapd.conf. It is not possible to load the ldif with ldapadd, because the OpenLDAP is running in proxy mode, so every request will be forwarded to MS-AD-Servers.
How do I convert the ldif-file to an schema file? Is there any tool. Or how to add a ldif-file to be loaded via slapd.conf.
What you would need to do is to remove the attributes
dn
,cn
andobjectClass
and replace all occurences ofolcAttributeTypes:
andolcObjectClasses:
withattributetype
andobjectclass
respectively.You can also do it via shell.
One-liner on linux shell:
Corresponding command in windows powershell: