SMB/CIFS External Mount not working with $user in remote folder [SOLVED]


#1

Hi Folks

I’ve just installed a fresh NextCloud 9 on Debian and it’s gone nice and smooth. I’ve enabled the External Storage and LDAP auth and configured both.

LDAP from A/D works flawlessly so I thought I’d work on getting some shares available and yes, yes I can. The one I can’t get to work is:

\server1\homefolders\department$user

The A/D usernames are firstname.lastname and the homefolder is exactly the same! Okay, so I get we can only have one remote subfolder so I create a share lower down thought I’d try this:

\server1\departmenthomefolders$user

When I set that it doesn’t map at all. However, if I swap out for my userID:

\server1\departmenthomefolders\firstname.lastname

That works.

Basically, it’s not doing $user.


#2

hi

Same issue as you.

$user take username in Nextcloud user list. If you look username in nextcloud it’s the SID and not the AD username, so when you use $user for folder it search folder name with SID.
If you create a folder with the SID it’s working…

I’m interest If you find a solution


#3

What that means is you need your Internal Username Attribute under Expert tab in LDAP settings to be an attribute that equals firstname.lastname. Please keep in mind that when changing Internal Username Attribute the following applies: Changes will have effect only on newly mapped (added) LDAP users. If it’s a test environment then you can clear your mappings - under the same tab - and reassign with the right attribute.

For example is the samaccountname attribute in your AD = firstname.lastname? If so, thats what you need to have.


#4

Give that man a payrise!

Fixed it.

Don’t forget to clear mappings and do it from a non-LDAP logged in user.


#5

Excellent! Glad I could help =)