Openfire and ldap search filter

Hey.
I have an LDAP filter so that Openfire only syncs Spark users.
(&(objectClass=organizationalPerson)(memberOf:1.2.840.113556.1.4.1941:=CN=IM,OU=Openfire,OU=groups,OU=users,DC=domain,DC=local))
But recently I wanted Openfire to exclude disabled accounts.
(&(objectClass=organizationalPerson)(memberOf:1.2.840.113556.1.4.1941:=CN=IM,OU=Openfire,OU=groups,OU=users,DC=domain,DC=local)(!userAccountControl:1.2.840.113556.1.4.803:=2))
This should work, but for some reason Openfire threw me out after this change,nobody can connect to the server and to the administration panel, I had to change the table value through mysql and restart the service.

here is sql query, suddenly it will be useful to someone.

UPDATE ofProperty 
SET propValue = '(&(objectClass=organizationalPerson)(memberOf:1.2.840.113556.1.4.1941:=CN=IM,OU=Openfire,OU=groups,OU=users,DC=domain,DC=local))' 
WHERE name like 'ldap.searchFilter';

syntax is slightly wrong.

2 Likes

you are awesome! :slightly_smiling_face:
thank you!)