Custom Home-Share-Name impossible?

traeu

Cadet
Joined
Jun 22, 2021
Messages
4
Hello!

I struggle to create a SMB home-directory-share with a custom name.
I'm running a small truenas installation (IP: 192.168.5.100) with three users. Every user has a home-directory on a share named Heim (home in german), its path is /mnt/HDD/Shares/Heim/. So home directory of user1 is /mnt/HDD/Shares/Heim/user1, for user2 it's /mnt/HDD/Shares/Heim/user2 and so on.
I created a SMB-share named "Heim", checked the option "Use as Home Share" and set its path to /mnt/HDD/Shares/Heim.
The problem is, the users can't reach their home share with smb://192.168.5.100/Heim.
user1 can only reach its home directory with smb://192.168.5.100/user1, and I found out by accident, also with smb://192.168.5.100/homes (I never set "homes" as share-name?).
For user2 the same: can reach its home directory only with /user2 and /homes, but not with /Heim.

Am I missing something? Is it wanted behaviour that Home-Shares are always reachable at /homes and /*USERNAME*, but not at the actual share-name?
Is anyone using home directory shares with custom names and the problem is in my installation?

Thanks for your help!
 

traeu

Cadet
Joined
Jun 22, 2021
Messages
4
I just found out another strange thing to this:

user1 can access his own home-directory with /homes, /user1, but also with /user2!
same for the other users, for example user2 can also use /user1 to access his home directory.

I guess I could use this as a dirty workaround: If I create a new user and name it like the Share-Name I want for my home directories (for example "heim") then all users should be able to access there home directories with /heim.
I tried it, this even works with a disabled user that has no home directory (set to "/nonexistent").
But its dirty...

Really strange behaviour!
If no one can confirm that this works without problems in other installations (and its just a bug in my installation) I will try to open a jira-ticket (never done that before).
 

smic717394

Dabbler
Joined
Apr 27, 2022
Messages
29
homes is not something you created. when you tick the box "used as home share", then truenas creates this folder and inside is the folder of each user. So if you have 2 users, user1 and user2 and you log on as user1, inside home there will only be the files of of user1, it will also create on the root an access with then name user1. If you don't want to see the homes folder edit the share and un-tick the box "Browsable on network clients". My guess is that you did something wrong.

Normally before you create the user, you create a dataset that you want to use as homeshare. So:

Step1: Go to pools, 2 dots on the pool and create data set, give it a name for example "USERS" and on the bottom of the set "share type 2 as SMB
Step2: Go to Sharing, Windows SMB, click on ADD and choose the from the list the USERS dataset, give it a name if you want, leave it enabled, and click advanced options.
Step3: Preset to "No Preset" and tick "use as home share" and click Send to save.
Step4: On the new share folder you just created, click 3 dots and edit system file ACL, here click on "Select ACL Preset" and choose Home. and Save.

Now you can create the users, you will see that when you create the users on Directories and Permissions it till be automatically populated as /mnt/POOL NAME/USERS/user1, you dont need to change anything, just save.

I think this is it
 

traeu

Cadet
Joined
Jun 22, 2021
Messages
4
thanks for your answer! I'm not sure if I expressed correctly what I am trying to do...
It's all about accessing home-shares over smb. I know how to set up home directories for users in general.

I want my users "user1", "user2" and "user3" to access their home share with
smb://IP.OF.MY.NAS/customname

And I think currently, it is not possible to give home shares a custom name.
Currently all users can use every variant of the following to access their personal home directory:
smb://IP.OF.MY.NAS/homes
smb://IP.OF.MY.NAS/user1
smb://IP.OF.MY.NAS/user2
smb://IP.OF.MY.NAS/user3

But it is not possible to give this share a custom name, like one can do with "normal" shares. With a normal smb-share, I can setup every share-name I want. I can make /mnt/POOL-NAME/Dataset-Name reachable via smb://IP.OF.MY.NAS/everynameiwant, but I can't do this with home shares. (the name one can give to smb-shares gets ignored when the smb-share is configured as home-share)

The only workaround I know is creating another user named "customname". Then every user can access their home share with every of these:
smb://IP.OF.MY.NAS/homes
smb://IP.OF.MY.NAS/user1
smb://IP.OF.MY.NAS/user2
smb://IP.OF.MY.NAS/user3
smb://IP.OF.MY.NAS/customname

which means, then every user can use "smb://IP.OF.MY.NAS/customname" to access their home directory.
 

willowen100

Cadet
Joined
Feb 19, 2022
Messages
4
I've noticed this behaviour with a custom name for the home share too. No matter what name you give the share folder used for the home share it doesn't set to anything but homes.
 

Attachments

  • List of SAMBA shares from TrueNAS.png
    List of SAMBA shares from TrueNAS.png
    8.6 KB · Views: 112
  • List of SAMBA shares from Windows 11.png
    List of SAMBA shares from Windows 11.png
    32.9 KB · Views: 116
Top