Home Share username conflicting with AD username (Ubuntu client)

dot.dot

Cadet
Joined
Sep 7, 2022
Messages
5
Hello.

Is there a way to change the way that Truenas names the Home Share folders, to have them be username@domain.tld ?

What I'm trying to do:
I have enrolled my Truenas into my AD (which is running in Nethserver).​
I am using Ubuntu 22.04
I am trying to mount this folder as the ubuntu workstations /home/%(USER) directory via pam_mount​
pam_mkhomdir is not creating the folders on the share, so I set an SMB share with "Use as Home Share" and am trying to leverage this functionality.​

Using FQDN user accounts:
  • I log into the FQDN for the user: testUser@company.com
  • The user is authenticated successfully.
  • Truenas will create the Home Share folder, under /mnt/myPool/myDataset/COMPANY/testUser but it strips anything after and including the @.
  • The mount will fail because In pam_mount I have no way to strip the @company.com portion of the mount path, so Linux will try to mount:
    • /mnt/myPool/myDataset/COMPANY/testUser@company.com
    • When this is the folder that is actually available:
      • /mnt/myPool/myDataset/COMPANY/testUser
Using non-FQDN user accounts:
  • I change sssd.conf to use local names: testUser
  • The user is authenticated successfully.
  • Truenas does not create the Home Share folder, with the error: mount error(13): Permission denied

I have tried to login with the FQDN to create the folders, and then switch to the non-FQDN version to make of the good path name, but it won't authenticate successfully to mount the share with: mount error(13): Permission denied

Is there a way to change the way that Truenas names the Home Share folders, for Active Directory users, to have them be username@domain.tld instead of DOMAIN/username ?

Many thanks!
 

dot.dot

Cadet
Joined
Sep 7, 2022
Messages
5
For my future self:

Services - SMB -> Auxiliary Parameters -> template homedir = /mnt/myPool/myDataset/%D/%U@company.com

Delete all the failed home dirs form the local machines, then login using the FQDN, and that should be it.
 
Top