SMB - Getting two different home folders

rootifera

Cadet
Joined
Jun 14, 2022
Messages
2
Hello,

This is my first day with TrueNAS (more like first couple of hours). I set up a classic SMB share, that one working fine. I wanted to create a separate SMB share for user homes but I'm getting a strange behaviour.

82b6facc87f03b68d50a8538cb697232.png


tester is a TrueNAS local user. here you can see "homes" and "tester" folders, they seem like separate shares however if you create a file in one it appears in the other one. So they are same folder appearing in two different names.

I have a dataset called homes (/mnt/DATA/homes) and it is shared through Windows Shares (SMB). the user's home is /mnt/DATA/homes/tester. When I disable homes share the users home disappear with the homes folder. When I enable it back both folder comes together.

It seems like I've done something stupid but I can't really figure out. I followed this document https://www.truenas.com/docs/core/coretutorials/sharing/smb/homeshare/ . It assumes there's an AD setup so I had to guess some of the settings.

Can someone please help? And please let me know if you need more information from me.

Thanks!
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hello,

This is my first day with TrueNAS (more like first couple of hours). I set up a classic SMB share, that one working fine. I wanted to create a separate SMB share for user homes but I'm getting a strange behaviour.

View attachment 56155

tester is a TrueNAS local user. here you can see "homes" and "tester" folders, they seem like separate shares however if you create a file in one it appears in the other one. So they are same folder appearing in two different names.

I have a dataset called homes (/mnt/DATA/homes) and it is shared through Windows Shares (SMB). the user's home is /mnt/DATA/homes/tester. When I disable homes share the users home disappear with the homes folder. When I enable it back both folder comes together.

It seems like I've done something stupid but I can't really figure out. I followed this document https://www.truenas.com/docs/core/coretutorials/sharing/smb/homeshare/ . It assumes there's an AD setup so I had to guess some of the settings.

Can someone please help? And please let me know if you need more information from me.

Thanks!
This is how the feature was designed back in the FreeNAS 8 days. If you uncheck the "browsable" button, "homes" will disappear. It is an alternative path for the user's home share. It works this way among other things for scripting / technical reasons. If Unix / Windows server auto-mounts //server/homes, it will automatically map to the particular user's home directory.

There are many legacy features in TrueNAS that we do not touch across upgrades to maintain maximum backwards compatibility with how people organized data in prior releases. This is one of those features.
 

rootifera

Cadet
Joined
Jun 14, 2022
Messages
2
This is how the feature was designed back in the FreeNAS 8 days. If you uncheck the "browsable" button, "homes" will disappear. It is an alternative path for the user's home share. It works this way among other things for scripting / technical reasons. If Unix / Windows server auto-mounts //server/homes, it will automatically map to the particular user's home directory.

There are many legacy features in TrueNAS that we do not touch across upgrades to maintain maximum backwards compatibility with how people organized data in prior releases. This is one of those features.
amazing! thank you so much, this is exactly what I needed!
 

dlaflamme

Dabbler
Joined
Jan 17, 2016
Messages
16
This is how the feature was designed back in the FreeNAS 8 days. If you uncheck the "browsable" button, "homes" will disappear. It is an alternative path for the user's home share. It works this way among other things for scripting / technical reasons. If Unix / Windows server auto-mounts //server/homes, it will automatically map to the particular user's home directory.

There are many legacy features in TrueNAS that we do not touch across upgrades to maintain maximum backwards compatibility with how people organized data in prior releases. This is one of those features.
Are you saying the auto-mount behavior happens due to the name of the share, specifically (//server/homes), or is it something else (like an attribute/some other setting on the share)?

Is it also the case that for the automount to work the usernames on the server and client doing the mount must be the same?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Are you saying the auto-mount behavior happens due to the name of the share, specifically (//server/homes), or is it something else (like an attribute/some other setting on the share)?

Is it also the case that for the automount to work the usernames on the server and client doing the mount must be the same?
Are you saying the auto-mount behavior happens due to the name of the share, specifically (//server/homes), or is it something else (like an attribute/some other setting on the share)?
There's not really an automount. The share path contains a macro %U in this case that is auto-expanded to the username of the user connecting to the share.

So if you connect using credentials for "bob", //server/homes would autocomplete to say /mnt/tank/homes/bob, but if you authenticate as "larry" you will get /mnt/tank/homes/larry. fstab entry would be same, but actual local path server-side would change based on the creds used.
 
Top