nextcloud / nextcloud/server

[Bug]: Not every user is getting a group set automatically, and not every user is shown from AD

Open
#41,152 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 26-feedback bug feature: ldap feature: users and groups
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

I've encountered a peculiar issue with LDAP/AD integration in Nextcloud.

In my Active Directory, there's a folder named "NextCloud_User" with five users, all of whom have the same permissions. However, Nextcloud is only displaying three out of the five users.

I'm using the following LDAP filter in Nextcloud:

(&(|(objectclass=person))(|(|(memberof=CN=NextCloud_User,OU=groups,OU=tempuserou,DC=Ligonine,DC=local)(primaryGroupID=15085))))

When I use "Domain Users" as the filter, it displays every user. However, for most of them, the system only sets them as "Domain Users" without any other group memberships. For some users, it correctly sets all the groups they belong to in Active Directory.

Steps to reproduce

Set up Nextcloud with LDAP/AD integration for user authentication.

Create an Active Directory (AD) group called "NextCloud_User."

Add five users to the "NextCloud_User" group with identical permissions.

Configure Nextcloud's LDAP filter to find users in the "NextCloud_User" group.

Observe that Nextcloud only displays three of the five users from the group.

Expected behavior

I expected Nextcloud to display all five users from the "NextCloud_User" group in Active Directory

Installation method

None

Nextcloud Server version

26

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MySQL

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the LDAP/Active Directory setup with the reported group filter and five users, then compare which users and group memberships Nextcloud discovers. Done means all five users in the NextCloud_User group are displayed and their Active Directory group memberships are assigned consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.