occ user:delete does not remove user completely (still listed by occ ldap:show-remnants)
Steps to reproduce
- have LDAP backend active
- list users removed from LDAP : occ ldap:show-remnants
- delete listed users occ user:delete xxx
- run again : occ ldap:show-remnants
- search in DB directly : select * from oc_preferences where userid='xxx;
Expected behaviour
Records from oc_preferences should be wiped out, thus users wouldn't be listed anymore by "occ ldap:show-remnants"
Actual behaviour
- users deleted are still listed
- configkey isDeleted and foundDeleted are still present
- Second pass of "occ user:delete xxx" actually completes deletion
Server configuration
Operating system: Debian 10
Web server: Apache/2.4.38
Database: PostgreSQL 11.9
PHP version: 7.3.19
Nextcloud version: (see Nextcloud admin page) 19.0.3
Updated from an older Nextcloud/ownCloud or fresh install: Updated
Where did you install Nextcloud from: https://download.nextcloud.com/server/releases/
Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled:
- accessibility: 1.5.0
- activity: 2.12.0
- admin_audit: 1.9.0
- cloud_federation_api: 1.2.0
- comments: 1.9.0
- contactsinteraction: 1.0.0
- dav: 1.15.0
- federatedfilesharing: 1.9.0
- federation: 1.9.0
- files: 1.14.0
- files_mindmap: 0.0.22
- files_pdfviewer: 1.8.0
- files_rightclick: 0.16.0
- files_sharing: 1.11.0
- files_trashbin: 1.9.0
- files_versions: 1.12.0
- files_videoplayer: 1.8.0
- firstrunwizard: 2.8.0
- logreader: 2.4.0
- lookup_server_connector: 1.7.0
- nextcloud_announcements: 1.8.0
- notifications: 2.7.0
- oauth2: 1.7.0
- password_policy: 1.9.1
- photos: 1.1.0
- privacy: 1.3.0
- provisioning_api: 1.9.0
- richdocuments: 3.7.4
- serverinfo: 1.9.0
- settings: 1.1.0
- sharebymail: 1.9.0
- support: 1.2.1
- survey_client: 1.7.0
- systemtags: 1.9.0
- text: 3.0.1
- theming: 1.10.0
- twofactor_backupcodes: 1.8.0
- updatenotification: 1.9.0
- user_ldap: 1.9.0
- user_saml: 3.2.1
- viewer: 1.3.0
- workflowengine: 2.1.0
Disabled:
- encryption
- files_external
- recommendations
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "19.0.3.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"ldapIgnoreNamingRules": false,
"theme": "",
"maintenance": false,
"loglevel": "2",
"log_type": "syslog",
"logtimezone": "Europe\/Paris",
"trusted_domains": [
"owncloud.enercoop.org",
"clood.enercoop.org"
],
"share_folder": "\/",
"mail_smtpmode": "smtp",
"filesystem_check_changes": 0,
"secret": "***REMOVED SENSITIVE VALUE***",
"activity_expire_days": 30,
"memcache.local": "\\OC\\Memcache\\APCu",
"filelocking.enabled": "true",
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0
},
"asset-pipeline.enabled": true,
"trashbin_retention_obligation": "7,30",
"versions_retention_obligation": "auto,365",
"appstore.experimental.enabled": false,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
"updater.release.channel": "stable",
"overwrite.cli.url": "https:\/\/clood.enercoop.org",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "25",
"default_language": "fr",
"data-fingerprint": "b4048ae237bdee6bbf0c497e69e021aa",
"ldapUserCleanupInterval": "10",
"mail_sendmailmode": "smtp"
}
}
Are you using external storage, if yes which one: local/smb/sftp/... No
Are you using encryption: No
Are you using an external user-backend, if yes which one: LDAP
LDAP configuration (delete this part if not used)
LDAP config
+-------------------------------+----------------------------------------------------------------+
| Configuration | |
+-------------------------------+----------------------------------------------------------------+
| hasMemberOfFilterSupport | 1 |
| homeFolderNamingRule | |
| lastJpegPhotoLookup | 0 |
| ldapAgentName | uid=nextcloud,ou=sysaccounts,o=xxxxx |
| ldapAgentPassword | *** |
| ldapAttributesForGroupSearch | |
| ldapAttributesForUserSearch | |
| ldapBackupHost | |
| ldapBackupPort | |
| ldapBase | o=xxxxx |
| ldapBaseGroups | o=xxxxx |
| ldapBaseUsers | o=xxxxx |
| ldapCacheTTL | 600 |
| ldapConfigurationActive | 1 |
| ldapDefaultPPolicyDN | |
| ldapDynamicGroupMemberURL | |
| ldapEmailAttribute | mail |
| ldapExperiencedAdmin | 0 |
| ldapExpertUUIDGroupAttr | |
| ldapExpertUUIDUserAttr | uid |
| ldapExpertUsernameAttr | uid |
| ldapExtStorageHomeAttribute | |
| ldapGidNumber | gidNumber |
| ldapGroupDisplayName | cn |
| ldapGroupFilter | (&(|(objectclass=xxxGroup))) |
| ldapGroupFilterGroups | |
| ldapGroupFilterMode | 1 |
| ldapGroupFilterObjectclass | xxxGroup |
| ldapGroupMemberAssocAttr | uniqueMember |
| ldapHost | ldaps://ldap.xxxxx.org |
| ldapIgnoreNamingRules | |
| ldapLoginFilter | (&(objectclass=xxxpeople)(uid=%uid)(xxxAllowedServices=clood)) |
| ldapLoginFilterAttributes | |
| ldapLoginFilterEmail | 0 |
| ldapLoginFilterMode | 1 |
| ldapLoginFilterUsername | 1 |
| ldapMatchingRuleInChainState | unknown |
| ldapNestedGroups | 0 |
| ldapOverrideMainServer | 0 |
| ldapPagingSize | 500 |
| ldapPort | 636 |
| ldapQuotaAttribute | |
| ldapQuotaDefault | |
| ldapTLS | 0 |
| ldapUserAvatarRule | default |
| ldapUserDisplayName | cn |
| ldapUserDisplayName2 | |
| ldapUserFilter | (&(|(objectclass=xxxPeople))(xxxAllowedServices=clood)) |
| ldapUserFilterGroups | |
| ldapUserFilterMode | 1 |
| ldapUserFilterObjectclass | xxxPeople |
| ldapUuidGroupAttribute | auto |
| ldapUuidUserAttribute | auto |
| turnOffCertCheck | 0 |
| turnOnPasswordChange | 0 |
| useMemberOfToDetectMembership | 1 |
+-------------------------------+----------------------------------------------------------------+
Client configuration
Browser:
Operating system:
Logs
Web server error log
Web server error log
Nothing relevant.
Nextcloud log (data/nextcloud.log)
Nextcloud log
Nothing relevant.
Browser log
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
Using Nextcloud 20.0.1 and I can confirm this bug and add that shares (in oc_share) for deleted user remain still exist.
same issue on nextcloud 19.0.3
Is this Issue still valid in NC21.0.3? If not, please close this issue. Thanks! :)
Hi, i will soon investigate on that so i'll be able to tell. But answers would be really better than close this issue just because it was opened long time ago. It is really a bug.
It isn't closed yet
Hi everyone,
I just saw this behavior (occ ldap:show-remnants still lists user after deleting them with occ user:delete and entries with isDeleted and foundDeleted remain in the oc_preferences table) on a NC-server running version 21.0.3.
Hello,
I have the same behavior on NC 21.0.3.
But if I run the occ user: delete on the same user a second time, this time everything seems to be deleted.
Do you see the same thing on your NC?
But if I run the occ user: delete on the same user a second time, this time everything seems to be deleted. Do you see the same thing on your NC?
Yep, second pass does the expected job.
cc @nextcloud/ldap Seems like it could be a problem with ldap...
cc @nextcloud/ldap Seems like it could be a problem with ldap...
https://github.com/orgs/nextcloud/teams/ldap : 404 :/
https://github.com/orgs/nextcloud/teams/ldap : 404 :/
The group exists, you just don't see it.
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.
I reopen this bug, i soon will be able to test user:delete.
This is still an issue with the latest Nextcloud: when deleting an ldap-user, you need to run "user:delete
Do you have logs from the delete attempt?
Do you have logs from the delete attempt?
Don't know who you were asking, but i still have the issue in 20.0.8, but no logs at all about this operation. I always need to run "occ user:delete" twice to get ''User does not exist" output when i try a 3rd deletion.
Same here: no log entry when deleting an ldap-user the 1st or 2nd attempt. This is with "'loglevel' => 2"
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.
This Issue still valid in NC22.2.0
This Issue still valid in NC22.2.0
https://github.com/nextcloud/server/issues/23425#issuecomment-906648340