server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: LDAP remnant users should not appear in search results

Open nfebe opened this issue 1 year ago • 8 comments

⚠️ This issue respects the following points: ⚠️

Bug description

In the list of disabled users command occ ldap:show-remnants, all users, including deactivated ones, are displayed. Reportedly, deactivated users are also showing up in the Nextcloud search.

Steps to reproduce

  1. Configure ldap
  2. Execute the command occ ldap:show-remnants.
  3. Observe the list of users, including deactivated ones.
  4. Perform a search in Nextcloud and note the presence of deactivated users in the results.

Expected behavior

Remnant users should be considered disabled?

Installation method

None

Nextcloud Server version

26

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • [ ] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

nfebe avatar Jan 23 '24 20:01 nfebe

Possibly related to : https://github.com/nextcloud/server/issues/9948

nfebe avatar Jan 23 '24 20:01 nfebe

cc: @nextcloud/ldap

nfebe avatar Mar 20 '24 10:03 nfebe

So you see remnants in Nextcloud user list? I’m not sure I understand the bug description, you say «In the list of disabled users command occ ldap:show-remnants, all users, including deactivated ones, are displayed.», that is not true, this command only list remnants users.

come-nc avatar Mar 21 '24 13:03 come-nc

In the original ticket the deactivated users are not shown in the user list but show up in the contact search: ldap

binford6000 avatar Apr 11 '24 06:04 binford6000

Hello,

I second this, they appears in the contacts section. It looks like the LDAP Remnants are also shown in the share panel on a file. (NC 27.1.7)

Best regards,

ThibautPlg avatar Apr 12 '24 14:04 ThibautPlg

occ dav:sync-system-addressbook should get rid of them. Also cleaning up https://docs.nextcloud.com/server/latest/admin_manual/configuration_user/user_auth_ldap_cleanup.html

blizzz avatar Apr 15 '24 14:04 blizzz

Hi, occ dav:sync-system-addressbook did not fix the remnants appearing in search results, nor in the addressbook. The users are "deleted" isDeleted=1 in oc_preferences, not disabled. That might be the source of the bug.

Also, ldap cleanup might not be a viable solution as it should be run manually otherwise it will delete accounts when the LDAP encounters a hiccup. And I can't see someone doing daily cleanups by guessing if the user is still on the ldap or if it's temporarily disabled by company policy but might return eventually.

ThibautPlg avatar Aug 06 '24 09:08 ThibautPlg

Also, ldap cleanup might not be a viable solution as it should be run manually otherwise it will delete accounts when the LDAP encounters a hiccup

Exactly. Hence, there is not automatic removal. This is always a manual action. What happens automatically is the discovery of missing users.

blizzz avatar Oct 11 '24 08:10 blizzz

Hi, occ dav:sync-system-addressbook did not fix the remnants appearing in search results, nor in the addressbook. The users are "deleted" isDeleted=1 in oc_preferences, not disabled. That might be the source of the bug.

A new feature that I totally missed and that someone from NC's support pointed me: it's now possible since Nextcloud 28 to treat LDAP remnant users as disabled. It's hidden in the advanced tab, but it's here.

It doesn't completely address this issue but can be a workaround.

ThibautPlg avatar Oct 18 '24 14:10 ThibautPlg