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

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.

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

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.

1 Like

Give that man a payrise!

Fixed it.

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

Excellent! Glad I could help =)

Hi Reagar,

any help on this, i am still struggling, its not working. if i map user.user ( LDAP ) with same name folder then it works but there is no automatic folder creation similar to LDAP name.