sudo -u www-data php occ ldap:show-remnants
shall work without setting anything in config.php?
You have to got LDAP connection configured and established.
LDAP is working fine.
I ask this question because I created a test user on AD and added it to the group cloudusers.
Test user was available on nextcloud.
I remove the test user and it wasn’t shown anymore in the user’s list as expected.
I also expected at this point to see the test user listed by show-remnants command, but it was not.