I think that two solutions are possible but I don't know how to do it
my method filterAll :
lsc.tasks.ADpam.srcService.filterAll = (&(ou=*)(objectClass=organizationalUnit))
This method should be modified in something like:
lsc.tasks.ADpam.srcService.filterAll = 
(&(ou=*)(objectClass=organizationalUnit)(dn=ou=UnitLevel1a,dc=testDomain,dc=com))
(this doesn't work because dn in not an attribute) and I will have two make one 
task by level of hierarchy.

The other solution is to modify the dn where it is printed
here is the curent dn constructor:
lsc.tasks.ADpam.dn = "ou=" + srcBean.getAttributeValueById("ou") + 
",ou=UnitLevel1a"
lsc.tasks.ADpam.dn = "ou=" + srcBean.getAttributeValueById("ou") +"," 
srcBean.getDN()
but this method doesn't exist.
Have you got suggestions?


-------- Message d'origine--------
De: Gunter Holzer [mailto:[email protected]]
Date: mer. 16/06/2010 15:37
À: François Chapuis ([email protected])
Cc: [email protected]
Objet : AW:  RE :  ldap2ldap synchro tasks
 
How does your DN constructor look like?

lsc.tasks.ADuser.dn = "CN=" + srcBean.getAttributeValueById("CN") + 
",OU=OpenLDAP"

Von: [email protected] [mailto:[email protected]]
Gesendet: Mittwoch, 16. Juni 2010 15:32
An: Gunter Holzer
Cc: [email protected]
Betreff: RE : ldap2ldap synchro tasks


This time it runned but I have some errors and warning
The first error comes from the fact that there is no UnitLevel4c in my 
destination serveur but I wanted this unit to be added :
juin 16 14:55:05 - ERROR - Error while adding entry ou=UnitLevel4c,ou=UnitLevel1
a in directory :javax.naming.directory.SchemaViolationException: [LDAP: error co
de 65 - entry has no objectClass attribute]; remaining name 'ou=UnitLevel4c,ou=U
nitLevel1a'
juin 16 14:55:05 - ERROR - Error while synchronizing ID ou=UnitLevel4c,ou=UnitLe
vel1a: java.lang.Exception: Technical problem while applying modifications to di
rectory
dn: ou=UnitLevel4c,ou=UnitLevel1a,dc=testDomain,dc=com
changetype: add
ou: UnitLevel4c
telephoneNumber: 0478444500
st: 4c


The following INFO shows that all my sub-entries which were not direct 
sub-entries of UnitLevel1a are changed to sub-entries of UnitLevel1 and their 
telephoneNumber are not modified.
My hierarchy was like that in the source:
ou=UnitLevel1a
    ou=UnitLevel2a
         ou=UnitLevel3a
             ou=UnitLevel4a
             ou=UnitLevel4b
         ou=UnitLevel3b
             ou=UnitLevel4c
    ou=UnitLevel2b
         ou=UnitLevel3c
And after synchronization in the destination:
ou=UnitLevel1a
    ou=UnitLevel2a
    ou=UnitLevel2b
    ou=UnitLevel3a
    ou=UnitLevel3b
    ou=UnitLevel3c
    ou=UnitLevel4a
    ou=UnitLevel4b
And except UnitLevel2a and UnitLevel2b no on has got the new telephone number.
One of the INFO :
juin 16 14:55:05 - INFO  - # Renaming entry ou=UnitLevel4b,ou=UnitLevel3a,ou=Uni
tLevel2a,ou=UnitLevel1a for ADpam
dn: ou=UnitLevel4b,ou=UnitLevel3a,ou=UnitLevel2a,ou=UnitLevel1a,dc=testDomain,dc
=com
changetype: modrdn
newrdn: ou=UnitLevel4b
deleteoldrdn: 1
newsuperior: ou=UnitLevel1a,dc=testDomain,dc=com

What is the procedure in order to not to change the rdn?


-------- Message d'origine--------
De: Gunter Holzer [mailto:[email protected]]
Date: mer. 16/06/2010 12:38
À: François Chapuis ([email protected])
Cc: [email protected]
Objet : AW: [lsc-users] RE :  ldap2ldap synchro tasks

Hi,

is the source attribute name "telephoneNumber" the same as in the destination 
ldap directory?
If not you have to specify the match:
For MS AD its "Phone" not "telephoneNumber"

#telephoneNumber <- Phone
lsc.syncoptions.ADpam.telephoneNumber.create_value = 
srcBean.getAttributeValueById("Phone")

Further you have to read the atrributes you like to sync from source AND 
destination directory.

lsc.tasks.ADpam.srcService.attrs = ou st telephoneNumber
and
lsc.tasks.ADpam.dstService.attrs = ou st Phone

Regards,

Gunter




Von: [email protected] 
[mailto:[email protected]] Im Auftrag von 
[email protected]
Gesendet: Mittwoch, 16. Juni 2010 12:28
An: Clément OUDOT
Cc: [email protected]
Betreff: [lsc-users] RE : ldap2ldap synchro tasks


By replacing "st" by "ou" it generates no error anymore. The problem is that 
the result is not as I hoped to. In my source serveur the all the units had an 
attibute telephoneNumber and not in the destination server. I  wished the 
synchro would add these attribute to the matching unit and that is not done.
How can I do that?


-------- Message d'origine--------
De: Clément OUDOT [mailto:[email protected]]
Date: mer. 16/06/2010 12:11
À: François Chapuis ([email protected])
Cc: [email protected]
Objet : Re: [lsc-users] ldap2ldap synchro tasks

2010/6/16  <[email protected]>:
> Hi
> I am trying to synchronize 2 ldap servers but it doesn't work. There is
> something I have certainly misunderstood in my lsc.properties.
> The connection to the sources and destination are correct.
> I have modified the lsc.properties-sample from the folder etc in a
> lsc.properties and executed this command :  bin/lsc -f etc -c all -s all -n
> Here are the errors I obtain :
>
> juin 16 11:12:41 - ERROR - Error while looking for (st=2b) in
> ou=UnitLevel1a: ja
> vax.naming.ServiceUnavailableException: 192.168.6.105:10389; socket closed;
> rema
> ining name 'ou=UnitLevel1a'
> juin 16 11:12:41 - ERROR - Error while synchronizing ID
> ou=UnitLevel4b,ou=UnitLe
> vel3a,ou=UnitLevel2a,ou=UnitLevel1a:
> javax.naming.ServiceUnavailableException: 1
> 92.168.6.105:10389; socket closed; remaining name 'ou=UnitLevel1a'
> dn:
> ou=UnitLevel4b,ou=UnitLevel3a,ou=UnitLevel2a,ou=UnitLevel1a,dc=testDomain,dc
> =com
> changetype: modrdn
> newrdn: ou=UnitLevel4b
> deleteoldrdn: 1
> newsuperior: ou=UnitLevel1a,dc=testDomain,dc=com
>
> juin 16 11:12:41 - ERROR - Error while looking for (st=4a) in
> ou=UnitLevel1a: ja
> vax.naming.CommunicationException: Software caused connection abort: recv
> failed
> [Root exception is java.net.SocketException: Software caused connection
> abort:
> recv failed]; remaining name 'ou=UnitLevel1a'
> juin 16 11:12:41 - ERROR - Connection lost! Aborting.
> juin 16 11:12:41 - ERROR - Error while synchronizing ID
> ou=UnitLevel4b,ou=UnitLe
> vel3a,ou=UnitLevel2a,ou=UnitLevel1a: javax.naming.CommunicationException:
> Softwa
> re caused connection abort: recv failed [Root exception is
> java.net.SocketExcept
> ion: Software caused connection abort: recv failed]; remaining name
> 'ou=UnitLeve
> l1a'
> dn:
> ou=UnitLevel4b,ou=UnitLevel3a,ou=UnitLevel2a,ou=UnitLevel1a,dc=testDomain,dc
> =com
> changetype: modrdn
> newrdn: ou=UnitLevel4b
> deleteoldrdn: 1
> newsuperior: ou=UnitLevel1a,dc=testDomain,dc=com
>
> juin 16 11:12:41 - INFO  - Starting clean for ADpam
> juin 16 11:12:41 - ERROR - javax.naming.CommunicationException: Software
> caused
> connection abort: recv failed [Root exception is java.net.SocketException:
> Softw
> are caused connection abort: recv failed]; remaining name 'ou=UnitLevel1a'
> juin 16 11:12:41 - ERROR - Empty or non existant destination (no IDs found)
>
> My hierarchy is simple as you can see from my ldif :
> version: 1
> dn: dc=testDomain,dc=com
> objectClass: dcObject
> objectClass: organization
> o: testOrganisation
> dc: testDomain
>
> dn: cn=Manager,dc=testDomain,dc=com
> objectClass: organizationalRole
> cn: Manager
>
> dn: ou=UnitLevel1a,dc=testDomain,dc=com
> st: 1a
> ou: UnitLevel1a
> objectClass: organizationalUnit
> telephoneNumber: 0400000000
>
> dn: ou=UnitLevel1b,dc=testDomain,dc=com
> st: 1b
> ou: UnitLevel1b
> objectClass: organizationalUnit
> telephoneNumber: 0500000000
>
> dn: ou=UnitLevel2a,ou=UnitLevel1a,dc=testDomain,dc=com
> telephoneNumber: 0478000000
> st: 2a
> ou: UnitLevel2a
> objectClass: organizationalUnit
>
> dn: ou=UnitLevel2b,ou=UnitLevel1a,dc=testDomain,dc=com
> telephoneNumber: 0477000000
> st: 2b
> ou: UnitLevel2b
> objectClass: organizationalUnit
>
> I am sure that the problem comes from something wrong in my lsc.properties
> and this particular extract:
> # List of defined tasks, seperated by commas
> lsc.tasks = ADpam
>
> # Java class name for the service to read objects from the source
> # Either "org.lsc.jndi.SimpleJndiSrcService" for ldap2ldap, or
> # "org.lsc.service.SimpleJdbcSrcService" for db2ldap
> # According to which service you use here, you only need *one* of the
> following sections
> lsc.tasks.ADpam.srcService = org.lsc.jndi.SimpleJndiSrcService
>
>
> ### SimpleJndiSrcService parameters
> # The parameters in this section only apply to the SimpleJndiSrcService
> # This section can safely be deleted if you are not using ldap2ldap
> synchronization.
>
> # Base DN for searches in the directory
> lsc.tasks.ADpam.srcService.baseDn = ou=UnitLevel1a
>
> # Filter to list all entries to synchronize
> lsc.tasks.ADpam.srcService.filterAll =
> (&(st=*)(objectClass=organizationalUnit))
>
> # Attributes to read from all entries used to match objects between source
> and destination
> lsc.tasks.ADpam.srcService.pivotAttrs = ou st
>
> # Filter to read one entry to synchronize, based on pivotAttrs above
> # This filter may contain one or several pivotAttrs defined above, like
> "{attributeName}"
> lsc.tasks.ADpam.srcService.filterId = (st={st})
>
> # Attributes to read from each entry used to read and write data
> lsc.tasks.ADpam.srcService.attrs = ou st telephoneNumber
>
> Can you explain me what's wrong?


Hi,

the log says that LDAP server at 192.168.6.105:10389 is not available.
Is the port correct?

Clément.




_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to