User cannot access a SMB share with a title equal to the username
Description
A SMB client with a username equal to the SMB share name cannot access that share. Logs show that TrueNAS is attempting to direct the access to a home directory for that user. The behavior is the same whether the user's home directory is set to /nonexistent or /home/[username], or a path to the dataset with the same name as the username.
I cannot attach the logs, but here is an exerpt from /var/log/samba4/log.smbd when the SMB client attempts to use credentials where the username matches the SMB share name. I have sanitized the username and replaced it with [username].
make_connection_snum: SMB_VFS_CONNECT for service '[username]' at '/mnt/zpool1/home/[username]' failed: No such file or directory
I seem to recall running into this problem in FreeNAS in 11.2 (I am not certain about the version number though) and worked around the issue at the time by changing the SMB share names. However since the middleware is looking for a user home even when the home is /nonexistent this appears to be a bug that should be resolved.
Problem/Justification
None
Impact
None
SmartDraw Connector
Katalon Manual Tests (BETA)
Activity
Show:
Andrew Walker January 5, 2021 at 7:26 PM
There was a separate bug / race affecting automatic zfs dataset creation and pam_mkhomedir that's fixed for the next release. I don't see a reason to re-open this ticket. Provide a zipped up version of the smbd core file in the linked ticket (should be under /var/db/system/cores).
Josh Karli January 5, 2021 at 7:06 PM
The smbd panic and internal error in the smb logs are being investigated in NAS-108881.
Josh Karli January 5, 2021 at 7:05 PM
Edited
@Andrew Walker please reopen this bug. The issue persists in 12.0-U1. Debug attached. Users still cannot mount SMB shares with a title equal to the username. This is true in fresh 12.0-U1 install and an upgrade from 12.0-release, but with the same config restored.
Andrew Walker December 1, 2020 at 1:03 AM
There was a bug in upstream samba regarding handling of shares that have the same name as usernames. It will be fixed in U1.
Josh Karli December 1, 2020 at 12:18 AM
Even if this is intended behavior by Samba there should be a warning dialog or something similar in the user config or SMB share UI screens that indicates this issue to the user.
Duplicate
Pinned fields
Click on the next to a field label to start pinning.
A SMB client with a username equal to the SMB share name cannot access that share. Logs show that TrueNAS is attempting to direct the access to a home directory for that user. The behavior is the same whether the user's home directory is set to /nonexistent or /home/[username], or a path to the dataset with the same name as the username.
I cannot attach the logs, but here is an exerpt from /var/log/samba4/log.smbd when the SMB client attempts to use credentials where the username matches the SMB share name. I have sanitized the username and replaced it with [username].
make_connection_snum: SMB_VFS_CONNECT for service '[username]' at '/mnt/zpool1/home/[username]' failed: No such file or directory
I seem to recall running into this problem in FreeNAS in 11.2 (I am not certain about the version number though) and worked around the issue at the time by changing the SMB share names. However since the middleware is looking for a user home even when the home is /nonexistent this appears to be a bug that should be resolved.