nextcloud / nextcloud/server

SMB external storage inaccessible when LDAP users authenticate with userPrincipalName

Open
#52,678 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 30-feedback bug feature: external storage feature: ldap
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

📝 Issue Summary

When accessing Nextcloud via LDAP using userPrincipalName (Windows LDAP schema), external shared folders hosted on a DC file server are not accessible to users. However, if authentication is performed using sAMAccountName, the external shared folders become accessible without any issues.

🚨 Current Behavior

Users logging into Nextcloud using userPrincipalName (e.g., username@domain.com) cannot access the external shared folders on the DC file server.

Users logging in using sAMAccountName (e.g., username) can access the external shared folders without any problems.

External Shared folder hosted in DC file server are not accessible to users (LDAP to Nextcloud) when the access is made thorugh userPrincipalName (Windows LDAP schema)
If Nextcloud access is done through sAMAccountName External Shared Folder are accessible.

Image

Steps to reproduce

Set up an LDAP connection between Nextcloud and a Windows Active Directory server.

Configure an external shared folder hosted on a DC file server in Nextcloud.

Attempt to access the external shared folder using a user logged in via userPrincipalName.

Observe that the folder is inaccessible.

Log in using the same user but authenticated via sAMAccountName.

Observe that the external shared folder is accessible.

Expected behavior

Users should be able to access external shared folders on the DC file server regardless of whether they authenticate using userPrincipalName or sAMAccountName.

Nextcloud Server version

30

Operating system

Debian/Ubuntu

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

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

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

No source files, tests, or entry points are named. First reproduce the difference between userPrincipalName and sAMAccountName authentication with the SMB external folder, then inspect the relevant authentication and external-storage logs; done means both login forms can access the same folder.

Written by the indexing model from the issue text.

Assessment

Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
39/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.