Le 21 mai 2010 12:00, Romain <[email protected]> a écrit :
> Yes I have this :
> -----------------------
> lsc.syncoptions.group.default.delimiter = $
> lsc.syncoptions.group.member.force_value = \
> var umembers = \
> srcBean.getAttributeValuesById("uniqueMember").toArray() ; \
> for (var i=0; i<umembers.length; i++ ) { \
> try { \
> umembers[i] = ldap.attribute(ldap.list( "cn=users", \
> "(sAMAccountName=" \
> + (srcLdap.attribute(umembers[i], 'uid').get(0) \
I hink the problem is juste above the parenthesis before
srcLdap.attribute is the problem
> + ")"
> )).get(0), 'distinguishedname').get(0) \
One parenthesis is in excess just above, and you miss the final ;
> } catch (e) { \
> umembers[i]=null \
There is a missing ; at the end of this line
> } \
> } \
> var members = new Array(); \
> var j=0; \
> for (var i=0; i<umembers.length; i++) { \
> if (umembers[i]!=null) members[j++]=umembers[i] \
Here also, missing ;
> } \
> members
Here too
> ------------------------------------
>
> Its strange
>
>
> Le 21/05/2010 11:52, Rémy-Christophe Schermesser a écrit :
>>
>> Did you change the option lsc.syncoptions.TASKNAME.default.delimiter
>> to another value ?
>>
>> Because by default it is ; which conflicts with javascript
>>
>> We usually use lsc.syncoptions.TASKNAME.default.delimiter = $
>>
>>
>> Le 21 mai 2010 11:42, Romain<[email protected]> a écrit :
>>
>>>
>>> Le 21/05/2010 11:35, Clément OUDOT a écrit :
>>>
>>> 2010/5/21 Romain<[email protected]>:
>>>
>>>
>>> Hello,
>>>
>>> I have snc my group from OpenLDAP to AD, but the users who belong to
>>> these
>>> group in my OpenLDAP, don't belong to these group in my AD.
>>>
>>> I have look this page,
>>> http://lsc-project.org/wiki/documentation/1.1/tutorials/synchronizegroups
>>> but i have no success.
>>>
>>> Is what someone have succeeded this ?
>>>
>>>
>>> I wrote this documentation based on a connector I made, so it should
>>> work. The tricky part is the javascript code that uses LDAP builtin
>>> methods to translate the OpenLDAP member DN inot the AD member DN.
>>> Please check that your user branch in AD is "ou=users', or change this
>>> value in javascript code, else users will not be found in AD.
>>>
>>>
>>> Clément.
>>>
>>>
>>>
>>>
>>> Yes, but i have a strange error :
>>>
>>> mai 21 11:42:17 - ERROR - Error while synchronizing ID {cn=test}:
>>> org.mozilla.javascript.EvaluatorException: il manque ')' dans des
>>> parenthèses (<cmd>#1)
>>> mai 21 11:42:17 - ERROR - All entries: 1, to modify entries: 0, modified
>>> entries: 0, errors: 1
>>>
>>> Nonetheless, i have check the code, and i think i have no error :
>>>
>>> ------------------------------------------
>>> lsc.syncoptions.group.member.force_value = \
>>> var umembers = \
>>> srcBean.getAttributeValuesById("uniqueMember").toArray() ; \
>>> for (var i=0; i<umembers.length; i++ ) { \
>>> try { \
>>> umembers[i] = ldap.attribute(ldap.list( "cn=users", \
>>> "(sAMAccountName=" \
>>> + (srcLdap.attribute(umembers[i], 'uid').get(0) \
>>> + ")"
>>> )).get(0), 'distinguishedname').get(0) \
>>> } catch (e) { \
>>> umembers[i]=null \
>>> } \
>>> } \
>>> var members = new Array(); \
>>> var j=0; \
>>> for (var i=0; i<umembers.length; i++) { \
>>> if (umembers[i]!=null) members[j++]=umembers[i] \
>>> } \
>>> members
>>>
>>> --------------------------------
>>>
>>> Thanks
>>>
>>> _______________________________________________________________
>>> Ldap Synchronization Connector (LSC) - http://lsc-project.org
>>>
>>> lsc-users mailing list
>>> [email protected]
>>> http://lists.lsc-project.org/listinfo/lsc-users
>>>
>>>
>>
>>
>> --
>> "In a world without walls and fences, who needs windows and gates ?"
>>
>> ------------------------------------------------------------------------------------------------------
>> LSC : Ldap Synchronization Connector : http://lsc-project.org
>>
>>
>>
>
>
>
>
--
"In a world without walls and fences, who needs windows and gates ?"
------------------------------------------------------------------------------------------------------
LSC : Ldap Synchronization Connector : http://lsc-project.org
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users