Deleting ldap users

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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, 12.0.2): 15.0.5
Operating system and version (eg, Ubuntu 17.04): CentOS 7.6 (vagrant Box)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.1): 7.1

The issue you are facing:
I am trying to use nexcloud from a vagrant box (ale_polidori/Nextcloud)
trying to delete ldap users that were there already.
I get this error on web interface:
An error occured during the request. Unable to proceed.
Tried the same from command line (OCC) and get this error
$ sudo -u apache /opt/rh/rh-php71/root/usr/bin/php /usr/share/nextcloud/occ user:delete 2cbff922-30c6-1038-9883-997c80ea56be

The specified user could not be deleted. Please check the logs.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. install vagrant, virtualbox, install nextcloud vagrant box
  2. login with admin account
  3. remove ldap user

The output of your Nextcloud log in Admin > Logging:

{"reqId":"XHpdW8si2WGquQD0723p4gAAAAE","level":1,"time":"2019-03-02T10:39:23+00:00","remoteAddr":"","user":"admin","app":"user_ldap","method":"DELETE","url":"/nextcloud/ocs/v2.php/cloud/users/f6d49de8-30c7-1038-9887-997c80ea56be","message":"User f6d49de8-30c7-1038-9887-997c80ea56be is not marked as deleted, not cleaning up.","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0","version":"","id":"5c7a5d6750d94"}

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

$CONFIG = array (
  'passwordsalt' => '9WThAUbv4rRS1WF4Peo9RuLcskbs9l',
  'secret' => 'QTA+93yRCZCpkjZOyr7WGjfcXUuhUAAjekI6ThYZsnu6C+hl',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'nextcloud.nethserver.local',
    2 => '',
    3 => '',
  'datadirectory' => '/var/lib/nethserver/nextcloud/',
  'overwrite.cli.url' => 'http://localhost',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'XXXXXXXXXX',
  'installed' => true,
  'instanceid' => 'oczhosrx4u96',
  'ldapUserCleanupInterval' => '5',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'loglevel' => 2,
  'logfile' => '/var/lib/nethserver/nextcloud/nextcloud.log',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => '',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'no-reply',
  'mail_domain' => 'nethserver.local',
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'theme' => '',
  '' => 'daily',

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

{"reqId":"dKZ5BJW3RTvpVGy0LOpE","level":1,"time":"2019-03-02T10:36:49+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"User 2cbff922-30c6-1038-9883-997c80ea56be is not marked as deleted, not cleaning up.","userAgent":"--","version":""}