Hello,

in the tutorial:
there is mentioned the some javascript in order to fetch the users in the
destination directory. I am trying to get this code adapted to my needs. I
have question regarding the line:

 var destDn = ldap.search("ou=users,ou=demo", "(sAMAccountName=" + uid + ")");

How is the search function specified? What are the arguments?

RIght now I've organized users in the destination dir (AD) like this:

dc: CN=User Name,OU=People,DC=example,DC=org
...
objectClass: person
cn: User Name
sAMAccountName=marian.thieme
uid=u12345
...

I tried to lookup users in the AD like this:
ldap.search("ou=people", "(uid=" + uid + ")");

But I am unsure about the 2 arguments I've to provide to ldap.search()

I can see from DEBUG logs that e.g. user dn:
uid=u12345,ou=people,dc=ldap,dc=example,dc=net does exist in the
source directory.

Since I have uid in the destination dir as well, I asume I can use the
uid to lookup the user.

However, a valid ldap query to retrieve the user "CN=User Name" with
uid u12345 from AD would be something like:
ldapsearch -b ou=people,$OBJECT_DN "(&(objectclass=person)(uid=u12345))"


Regards,

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

lsc-users mailing list
lsc-users@lists.lsc-project.org
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users

Reply via email to