Samba user home path not accessible if directory added after %U - canonicalize_connect_path failed
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| samba (Ubuntu) |
Fix Released
|
Critical
|
Marc Deslauriers | ||
Bug Description
Hi,
In our Samba 4.13.17 configuration file, we have defined the user home path as below:
path = /home/%U/FILES
It worked find up to Ubuntu 20.04 with package version Samba version 2:4.13.
But since update to Samba version 2:4.13.
Jan 25 11:17:52 ff0119 smbd[2657856]: [2023/01/25 11:17:52.605790, 0] ../../source3/
Jan 25 11:17:52 ff0119 smbd[2657856]: make_connection
Indeed in the logs, instead of trying to access /home/john/FILES for user john, Samba seems to be trying to access /home/FILES (the user part of the path being stripped out for some unknown reason). It is like the %U value become empty or unreadable.
Other paths such as logon script do not seem affected by the issue. The other shared folders remain fully accessible to end-user but not their home directory.
For now the only workaround we may have found working is either:
- to use a different home path without sub-folder: /home/%U in the samba configuration
- downgrade Samba to package version 2:4.13.
- setup manually a new share with the full manual path of the user home directory (/home/john/FILES) without using the %U then access to the directory works... not the most convenient in a large multi-user environment..
In help you could provide in resolving this issue quickly would be much appreciated.
Regards,
Richard
CVE References
| affects: | ubuntu → samba (Ubuntu) |
| tags: | added: focal |
| Changed in samba (Ubuntu): | |
| assignee: | nobody → Marc Deslauriers (mdeslaur) |
| importance: | Undecided → Critical |
| information type: | Public → Public Security |

Status changed to 'Confirmed' because the bug affects multiple users.