Listener module adjust LDAP-filter to only run on a specifc group

Here we go again…
I would like to only run my code when a user is in a specifc group but when I add “(memberOf=cn=normalusers,cn=groups,dc=mydomain,dc=tld)” to the filte rit sitll runs on every user change:
also, would it be possible ot use someting like “memberOf=cn=normalusers” instead?

description = 'print all names/users/uidNumbers into a file'
filter = ''.join("""\

This is the script I use as a base:

Hello @letmesetupthis

some cents:

  • don’t forget the )""".split()) at the end of the filter
  • after editing your listener code, you have to do a systemctl restart univention-directory-listener.service to apply the changes
  • instead of (memberOf=cn=normalusers,cn=groups,dc=mydomain,dc=tld) you can also use (memberOf=cn=normalusers*) with regex



is at the end of the filter.

and I used

systemctl restart univention-directory-listener.service

and now I’m using


but it’s also running on all other users.

also had to add it here: