问题
I've to create a big directory where all users from multiple active directorys are referenced. I just need some few Informations like original DN and Name , maybe mail...
I decided to build my trees like follows:
[collector directory]
|
|-->[ OU <Name of Location1> ] -> [ {Objects Location1} ]
|
|-->[ OU <Name of Location2> ] -> [ {Objects Location2} ]
I started by installing openldap on a debian system and created ldap export with ldapserch from and stored it in an .ldsi file.
I read man ldapadd but i coudn't find a parameter to append a root dn, so i created a bash script and just search and replaced the part of the dn:
Original [DC=example1,DC=org] => [OU=example1,OU=org,OU=location1,DC=collector,DC=com]
sadly this won't work because all entrys that contains special chars (ä,ü,ö..) are encoded to base64, i tryed to do some "base64decoding replacing and encoding and replacing again" but this workarround just feels bad to me and i dont get a working result...
I searched a while and i found just LSC but it seems oversized and i've to use java and java sql.. witch i like to avoid....
is there a simple solution? do i've to use lsc or have to script this search and replace thing?
回答1:
You should be looking into either:
- the OpenLDAP translucent overlay, or
- the LDAP backend,
rather than building an entire new DIT.
See also the Zytrax OpenLDAP for Rocket Scientists guide, which is pretty complete and reliable.
来源:https://stackoverflow.com/questions/45483947/use-openldap-to-summarize-multiple-activedirectory-ldapadd-append-objects-to-n