[Samba] Change in behaviour for the "%U" substitution in 4.10.8?

gac gac at tutanota.com
Fri Sep 6 07:29:24 UTC 2019

Hi knowledgable Samba folks,
I have a Samba server (Ubuntu 18.04, with the packages from apt.van-belle.nl so that I can run recent versions of Samba with Time Machine). This box is configured to use Active Directory authentication as a domain member. Happy to share relevant parts of configuration if necessary, feel free to just ask.

I have two shares that are configured to use %U username substitutions; one is the standard "homes" share in order to expose "/shares/domain/username" via "\\server\username". The second is a Time Machine share to expose each users TM backups in "/shares/backups/timemachine/username" via "\\server\timemachine"

I upgraded from 4.10.7 to 4.10.8 this morning, and these two shares are now not working correctly because it seems that the username provided by %U is now prefixed with the domain name in lowercase:

[2019/09/06 07:57:58.812904,  0] ../../source3/smbd/service.c:828(make_connection_snum)
  make_connection_snum: '/shares/DOMAIN/domain_username' does not exist or permission denied when connecting to [username] Error was No such file or directory

My [homes] share looks pretty standard:

   path = /shares/DOMAIN/%U
   comment = Home Directories
   browseable = no
   writeable = yes
   printable = no
   create mask = 774
   directory mask = 774
   group = "employees"

And the folders in question _do_ exist as /shares/DOMAIN/username as they always have.

I find it hard to believe that the one change that went into Samba 4.10.8 could have broken this behaviour, but here we are...I did notice that my capitalisation is slightly different from that on the smb.conf man page and I switched my upper case U (which may be incorrect but has always worked) for a lower case u and this causes the same error, except this time the missing path is reported as

Nothing has changed on the client side - I checked the Keychain on my Mac, and I only specify my username, with no domain specified. While this may be considered incorrect, it worked until I did the upgrade ~30 minutes ago.

Thanks for any help you can provide!

More information about the samba mailing list