NC31 LDAP and oc_accounts relationship

Hi,

I am migrating to NC from Owncloud. My oc_accounts table in OwnCloud has 760 records (LDAP and database users). My NextCloud oc_accounts table has 76280 records. It seems that NC will try to pre-populate the oc_accounts table from ldap even if the ldap users have not logged in.

This is causing all sort of issues, for example, when doing a occ user:list query, I get a “Duplicate PRIMARY key” error for the oc_accounts table even if the LDAP user doesn’t exist in oc_accounts. It seems that NC is trying to pre-populate oc_accounts using LDAP records but it is finding duplicates. The NC ldap documentation is really poor. Has anyone else faced a similar situation? Is there a way to disable the pre-population of LDAP records into oc_accounts (to have NC behave like OwnCloud does)?