[lsc-users] Issues syncing ApacheDS Ldap with MySQl DB

Clément OUDOT clem.oudot at gmail.com
Mon Oct 20 14:27:39 CEST 2014

2014-10-20 13:50 GMT+02:00 <jijo.cs10 at iitp.ac.in>:

> Hi Clement ,
> Thanks for the quick reply.
> If i have 3 different tasks for user sync,group sync and the user_group
> sync, that would work, but that does not satisfy the use-case that i am
> aiming for. Is there no way in which I can do the following:
> 1)sync Groups, fetch its member attr, then for each of the members do an
> ldap search in ou=Users and fetch its attributes?

Yes you can, with ScriptableJndiServices:

For example; here is a code to map a source DN with a destination DN
(attribute manager) :

                var manager = srcBean.getDatasetFirstValueById("manager");
                var adManager;
                if ( manager.length() ) {
                try {
                        var uid = srcLdap.attribute(manager, "uid").get(0);
                        var res = ldap.list( "ou=users,ou=demo",
"(sAMAccountName="+uid+")" ).get(0);
                        adManager = res + "," +ldap.getContextDn();
                } catch (e) {};

> 2)I also understand that i will have to make some changes to the SqlMap i
> have constructed in this scenario(as it will no longer deal with just 1
> table in this case).If there is a way to achieve 1) then what changes do i
> make to the SQLMAp?

With 1) you will get an array of values for your dataset. I don't know how
to use this array inside the sqlmap. We usually push only single values
inside databases.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lsc-project.org/pipermail/lsc-users/attachments/20141020/0135426a/attachment.htm>

More information about the lsc-users mailing list