Attempts to delete LDAP users fail (Version 21.0.3) and prior

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 21.0.3
Operating system and version (eg, Ubuntu 20.04): CentOS 8.4.2105
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.37 (centos)
PHP version (eg, 7.4): 7.4.23

The issue you are facing:
Unable to delete users that were imported through LDAP. The LDAP integration source of these users has been removed from settings but users originally imported cannot be deleted.

Is this the first time you’ve seen this error? (Y/N): N
This issue has been occurring throughout mu

Steps to replicate it:

  1. Pick a user that was created through LDAP.
  2. Delete the user and see the flash of a message stating an error has occurred. “An error occured during the request. Unable to proceed.” <<Yes, occurred is misspelled within the error message>>
  3. Review logging to obtain additional information

The output of your Nextcloud log in Admin > Logging:

{"reqId":"YVw8s-K7D5Qq8L52GiJCnAAAAAk","level":1,"time":"2021-10-05T11:53:24+00:00","remoteAddr":"71.158.91.21","user":"87AA0760-DB46-4A51-85AD-7EC8D012A01B","app":"user_ldap","method":"DELETE","url":"/clients/ocs/v2.php/cloud/users/0A0FED17-284A-4912-BC18-0F1DC653F3EE","message":"User 0A0FED17-284A-4912-BC18-0F1DC653F3EE is not marked as deleted, not cleaning up.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0","version":"21.0.3.1","id":"615c3cc4cb4d2"}

{"reqId":"YVw8s-K7D5Qq8L52GiJCnAAAAAk","level":1,"time":"2021-10-05T11:53:24+00:00","remoteAddr":"71.158.91.21","user":"87AA0760-DB46-4A51-85AD-7EC8D012A01B","app":"no app in context","method":"DELETE","url":"/clients/ocs/v2.php/cloud/users/0A0FED17-284A-4912-BC18-0F1DC653F3EE","message":"Deprecated event type for OCP\\IUser::changeUser: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0","version":"21.0.3.1","id":"615c3cc4cb539"}

{"reqId":"YVw8s-K7D5Qq8L52GiJCnAAAAAk","level":1,"time":"2021-10-05T11:53:24+00:00","remoteAddr":"71.158.91.21","user":"87AA0760-DB46-4A51-85AD-7EC8D012A01B","app":"no app in context","method":"DELETE","url":"/clients/ocs/v2.php/cloud/users/0A0FED17-284A-4912-BC18-0F1DC653F3EE","message":"Deprecated event type for OCP\\IUser::preDelete: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0","version":"21.0.3.1","id":"615c3cc4cb593"}

{"reqId":"YVw8s-K7D5Qq8L52GiJCnAAAAAk","level":1,"time":"2021-10-05T11:53:24+00:00","remoteAddr":"71.158.91.21","user":"87AA0760-DB46-4A51-85AD-7EC8D012A01B","app":"no app in context","method":"DELETE","url":"/clients/ocs/v2.php/cloud/users/0A0FED17-284A-4912-BC18-0F1DC653F3EE","message":"Deprecated event type for \\OCA\\DAV\\CardDAV\\CardDavBackend::updateCard: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0","version":"21.0.3.1","id":"615c3cc4cb5ec"}

{"reqId":"YVw8s-K7D5Qq8L52GiJCnAAAAAk","level":1,"time":"2021-10-05T11:53:23+00:00","remoteAddr":"71.158.91.21","user":"87AA0760-DB46-4A51-85AD-7EC8D012A01B","app":"no app in context","method":"DELETE","url":"/clients/ocs/v2.php/cloud/users/0A0FED17-284A-4912-BC18-0F1DC653F3EE","message":"Deprecated event type for OCP\\IUser::changeUser: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0","version":"21.0.3.1","id":"615c3cc4cb643"}

{"reqId":"YVw8s-K7D5Qq8L52GiJCnAAAAAk","level":1,"time":"2021-10-05T11:53:23+00:00","remoteAddr":"71.158.91.21","user":"87AA0760-DB46-4A51-85AD-7EC8D012A01B","app":"no app in context","method":"DELETE","url":"/clients/ocs/v2.php/cloud/users/0A0FED17-284A-4912-BC18-0F1DC653F3EE","message":"Deprecated event type for OCP\\IUser::preDelete: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0","version":"21.0.3.1","id":"615c3cc4cb69a"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocwa5worhqkt',
  'passwordsalt' => '*********************************',
  'secret' => '************************************',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '*.*.com',
    2 => '#.#.#.#',
  ),
  'trusted_proxies' =>
  array (
    0 => '#.#.#.#',
  ),
  'overwritehost' => '*.*.com',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/clients',
  'overwritecondaddr' => '^#\\.#\\.#\\.#$',
  'datadirectory' => '/home/nextcloud-clients/data/',
  'dbtype' => 'mysql',
  'version' => '21.0.3.1',
  'overwrite.cli.url' => 'http://#.#.#.#/clients',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nxtclduser',
  'dbpassword' => '*********',
  'installed' => true,
  'mail_from_address' => 'clients',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '*.com',
  'mail_smtphost' => '#.#.#.#',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
  'loglevel' => 0,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'theme' => '',
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE