LDAP Login and External Storage when AD username and email address are different

  • Nextcloud 22.2.3 server [Linux machine]
  • Windows Server 2019 Domain Controller
  • Windows Server 2019 with shared folder

External cifs storage is connected fine.
Users whose AD username and email address are the same can log in and access the external shares.
Users whose AD username is different from their email can log in with email, but external drives appear in pinkish hue and when clicking on one it says:
External mount error
There was an error with message: Empty response from the server. Please contact your system administrator.

These users can log in with their username instead of the email and it works normally.

I tried the suggestion in the last post here: LDAP login and external storage - :information_source: Support - Nextcloud community but after editing the LoginCredentials.php file nextcloud starts erroring.

All our other web logins are using email now, and I would like to keep that standard if possible.


To summarize: Users whose Active Directory username is different from their email address can log in to Nextcloud with their email address but cannot access the cifs shares on external storage (connected via Login credentials, save in database).

How can we get Nextcloud to use their username for cifs credentials after logging in with their email address?


Checking in. I haven’t resolved this yet. Thanks.

Anyone have an idea? My programming skills aren’t the greatest, but if someone could point me to the right direction I may be able to hack out a solution. Thanks.

Still an unresolved issue. I have been thinking about changing everyone’s username to their email address, this may push me toward that end sooner than expected. :frowning: