Never mind, I just found it can setup on the slapd.conf.

JL

2011/10/7 JOSE L MARTINEZ-AVIAL <jlmagc@gmail.com>
Hi,
  I've an openldap 2.4.23 over RHEL4. I compilled it with the option to use overlay memberof, and it's been working well so far when I created groupOfNames. The issue is that I need to switch to groupOfUniqueNames instead of groupOfNames.  When I do that, it seems that the overlay does not work, so I don't receive any group at all when I do a search returning memberof. Is it possible to setup the overlay to do that?

  Thank you

Jose Luis