LDAP filters

I have openfire setup ok, it can read off our LDAP database no problem.

I cannot for the life of me figure out how to filter the uids to a particular OU, we have multiple OU’s in the LDAP database and only want it to pull out users from one of those.

Also in our OU=Groups is it possible to have the group filter to extract users from cn’s mailAlternateAddress and strip out the @domain.com to get to the user?

My basis for this is that it would be nice to when editing an email group for that to also modify the group that openfire uses. If not i’ll be having to modify memberUid and mailAlternateAddress in every group, which is a huge pain.

Thanks in advance for any assistance

Ok it seems changing the

ldap.groupMemberField

to

mailAlternateAddress

Picks up the users based on email address… so that is good. (This is something i already tried but it didn’t show up straight away)

Just need to filter the uid’s to a particuler OU now.

Having issues trying to get this to work with our structure. If i do this for the base DN it works in the sense that the OU we use for accounts works ok by itself, OU=People,dc=company,dc=co,dc=nz

But that means i can’t use the OU=Groups

So how do i set it so that for users only use OU=People and for groups only look in OU=Groups?

Tried my hand at filtering, none are working and there isn’t much documentation on this.

Cheers!

_(&(objectClass=organizationalPerson)(dn=,_OU=People,dc=company,dc=co,dc=nz))*

or

(&(objectClass=organizationalPerson)(ou:dn:=People*))*

*maybe ?
*

*Actuali I think that there is 2 ldab base DN parameters, 1for all objects and 1 for group. Please try searching group base dn or alternate dn.
*

Ok worked it out, here are the settings i applied to limit our openfire to two specific OU’s and the filters to use so that it uses the required users in each group.

ldap.baseDN

OU=People,dc=company,dc=co,dc=nz

ldap.alternateBaseDN

OU=Groups,dc=company,dc=co,dc=nz

ldap.groupMemberField

mailAlternateAddress

ldap.groupSearchFilter

(objectClass=organizationalRole)

ldap.searchFilter

(objectClass=“We have a custom object class on uid’s in OU=People that i used”)