larskanis/pg-ldap-sync

Multiple OU

alvlad opened this issue · 1 comments

Hi! Is it possible to use multiple OU for sync users. Can i add 2 or 3 OU's in this code?

Search parameters for LDAP users which should be synchronized

ldap_users:
base: OU=company,OU=company,DC=company,DC=de

Not sure what the question is about: Do you like to specify multiple OUs to traverse through the LDAP tree? Then yes, you can use a sequence of OUs in the base attribute.

Or do you need several OUs in parallel? Then you don't have to specify an OU at all. You can use a base LDAP DN that is high enough in the LDAP tree to get all OUs of interest. Then you might use the filter attribute to catch only the OUs you care about.

Alternatively you can use two instances of pg-ldap-sync with dedicated config files and dedicated postgresql groups. But this is usually only necessary in case of distinct LDAP trees and/or servers.