SMB home shares accessible as _any_ user name, not just own

vvuk

Cadet
Joined
Jun 6, 2016
Messages
5
Hello! I just did a clean install of TrueNAS-12.0-U6, to replace a previous FreeNAS system. So far everything is running great, except for a strange problem with SMB home directory shares. If I have users "alice", "bob", and "frank" (users on TrueNAS), alice can access her home directory as '\\tank\alice'. However, she can also access her own directory as \\tank\bob and \\tank\frank! Likewise with all the other users; they get access to their own dir, but any other valid username also presents their own directory.

I had this working properly in FreeNAS, but I believe I had to write in some custom smb config bits; I'd have to dig it up.

Here's what the share configuration looks like:

1633827937445.png


Any suggestions? It's not a dealbreaker, but it's really odd, and I'm concerned it's masking some other problem in my configuration.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Historically, FreeNAS / TrueNAS has appended the path suffix %U to share paths (which automatically expands to the currently authenticated user. This default cannot be changed because many users depend on this historic design decision. This means the behavior you see is expected. If you wish to have the SMB share auto-connect to the user's home directory, omit the path (replace with empty string).
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
That said, if you choose to go this way, then potentially any user can connect to any other user's home share (depending on filesystem permissions).
 
Top