powered by Jive Software

Filtering LDAP users

I would like to filter out all LDAP users that have a number in their username. Is this possible? If so, what would be the string and where would I put it?



Hi Jason,

What you’'re asking is easily done in the search filter, but LDAP queries are considerably slower when filtering by criteria such as that. ie, something that does not exist, rather than something that does.

the LDAP filter would look like this:


expanded for more numbers if needed… but the more you add, the slower it becomes.

I have not tested this in jive, but it does work with a raw LDAP query… although this alone takes 30 seconds to do on my (admittedly large) LDAP database. If your database is smaller then maybe you won’'t have a problem?

I believe your jive-messenger.xml file needs to look like this:

<! [CDATA[(&(!(uid=0))(!(uid=1))(!(uid=2)))]]>

Hope this is enough to point you in the right direction.