enterprise-support team mailing list archive
-
enterprise-support team
-
Mailing list archive
-
Message #10993
[Bug 2123902] [NEW] Regression in %m Variable Substitution in Samba Config After Upgrade
Public bug reported:
Description:
After upgrading Samba from 2:4.15.13+dfsg-0ubuntu1.5 to
2:4.15.13+dfsg-0ubuntu1.8, the %m variable in the smb.conf configuration
file stopped resolving to the hostname as it previously did. This issue
affects configurations that rely on %m for host-based home directory
mapping.
Use Case:
My Samba server is configured to serve user home directories based on
both hostname and username. Here is the relevant section of my
/etc/samba/smb.conf:
[homes]
comment = Home Directories
path = /share/samba/%m/%S
This configuration had worked for years. For example, when client1
connected as user1, the server would serve the home directory from:
/share/samba/client1/user1
Observed Behavior:
Up to version 2:4.15.13+dfsg-0ubuntu1.6:
%m was correctly substituted with the client's hostname (e.g., client1).
In version 2:4.15.13+dfsg-0ubuntu1.7:
%m was empty (""), causing Samba to try accessing /share/samba//user1, which failed due to a nonexistent path.
In version 2:4.15.13+dfsg-0ubuntu1.8:
%m is now set to the client's IP address (e.g., 192.168.1.123) instead of the hostname, resulting in paths like:
/share/samba/192.168.1.123/user1
This is not the intended behavior and breaks existing configurations.
Debugging:
To debug the value of %m, I added the following line to the config:
preexec = /bin/sh -c 'echo m=%m >> /tmp/smb.log'
Results:
With 2:4.15.13+dfsg-0ubuntu1.5 (or .6):
m=client1
With 2:4.15.13+dfsg-0ubuntu1.7:
m=
With 2:4.15.13+dfsg-0ubuntu1.8:
m=192.168.1.123
Conclusion:
This appears to be a regression in how Samba resolves %m. It may be
related to [Bug 2120811], which also affected other variables like %U.
For now, I’ve reverted to 2:4.15.13+dfsg-0ubuntu1.5, where everything
works as expected. I'm hoping for a fix or clarification in a future
release.
Best regards.
** Affects: samba (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to samba in Ubuntu.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/2123902
Title:
Regression in %m Variable Substitution in Samba Config After Upgrade
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2123902/+subscriptions
Follow ups