Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/
Steps to reproduce
1.Enable LDAP backend
2.Configure LDAP to read all LDAP users in a given OU
3.Refine filter to a given group (memberOf=CN=groupname,OU=...,DC=...)
4.Include 'ldapUserCleanupInterval ' => 1, into config.php
5.Wait over a day for cleanup to take place...
As I've been reading in the forums in version 9.x cleanup should apply on users based on the filter applied on users tab and there's no need to actually erase a user in LDAP for it to be cleaned up.
All the users (members and not members of the desired group) still appear in Users administration page. Moreover if I type "sudo -u www-data php occ ldap:show-remnants" I get an empty output (just the headers of the fields). So there's no users marked as "deletable". I'm seeing hundreds of users even if in the Users tab on LDAP administration I click "Verify settings and count users" and I get "7 users found".
Operating system: Debian 8.5
Web server: Apache 2.4.10
Database: MySQL Ver 14.14 Distrib 5.5.50
PHP version: 5.6.24-0+deb8u1
ownCloud version (see ownCloud admin page): 9.1.0 (stable)
Updated from an older ownCloud or fresh install: fresh install
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808):
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption): LDAP authentication
Integrity status for oC9+
Login as admin user into your ownCloud and access http://example.com/index.php/settings/integrity/failed paste the results here.
No errors have been found.