Starting with the packages that show the bug:
ubuntu@trusty-samba-include-1583324:~$ apt-cache policy samba
samba:
Installed: 2:4.3.11+dfsg-0ubuntu0.14.04.16
Candidate: 2:4.3.11+dfsg-0ubuntu0.14.04.16
Version table:
*** 2:4.3.11+dfsg-0ubuntu0.14.04.16 0
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
ubuntu@trusty-samba-include-1583324:~$ sudo samba-tool testparm -d 2
lpcfg_load: refreshing parameters from /etc/samba/smb.conf
Can't find include file /etc/samba/smb.conf.%U
ERROR: Unable to load default file
ubuntu@trusty-samba-include-1583324:~$ echo $?
255
Upgrading to the packages from proposed:
ubuntu@trusty-samba-include-1583324:~$ apt-cache policy samba
samba:
Installed: 2:4.3.11+dfsg-0ubuntu0.14.04.17
Candidate: 2:4.3.11+dfsg-0ubuntu0.14.04.17
Version table:
*** 2:4.3.11+dfsg-0ubuntu0.14.04.17 0
500 http://archive.ubuntu.com/ubuntu/ trusty-proposed/main amd64 Packages
100 /var/lib/dpkg/status
The testparm command now works. It shows the config file, remarks that the "%U" file was ignored, and exits with status 0:
ubuntu@trusty-samba-include-1583324:~$ sudo samba-tool testparm -d 2
lpcfg_load: refreshing parameters from /etc/samba/smb.conf
Tried to load /etc/samba/smb.conf.%U but variable substitution in filename, ignoring file.
Press enter to see a dump of your service definitions
# Global parameters
[global]
netbios name = SAMBA
server string = %h server (Samba, Ubuntu)
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
log level = 2
log file = /var/log/samba/log.%m
max log size = 1000
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
include = /etc/samba/smb.conf.%U
ubuntu@trusty-samba-include-1583324:~$ echo $?
0
Trusty verification
Starting with the packages that show the bug: trusty- samba-include- 1583324: ~$ apt-cache policy samba dfsg-0ubuntu0. 14.04.16 dfsg-0ubuntu0. 14.04.16 dfsg-0ubuntu0. 14.04.16 0 archive. ubuntu. com/ubuntu/ trusty-updates/main amd64 Packages security. ubuntu. com/ubuntu/ trusty- security/ main amd64 Packages dpkg/status
ubuntu@
samba:
Installed: 2:4.3.11+
Candidate: 2:4.3.11+
Version table:
*** 2:4.3.11+
500 http://
500 http://
100 /var/lib/
ubuntu@ trusty- samba-include- 1583324: ~$ sudo samba-tool testparm -d 2 smb.conf. %U trusty- samba-include- 1583324: ~$ echo $?
lpcfg_load: refreshing parameters from /etc/samba/smb.conf
Can't find include file /etc/samba/
ERROR: Unable to load default file
ubuntu@
255
Upgrading to the packages from proposed: trusty- samba-include- 1583324: ~$ apt-cache policy samba dfsg-0ubuntu0. 14.04.17 dfsg-0ubuntu0. 14.04.17 dfsg-0ubuntu0. 14.04.17 0 archive. ubuntu. com/ubuntu/ trusty- proposed/ main amd64 Packages dpkg/status
ubuntu@
samba:
Installed: 2:4.3.11+
Candidate: 2:4.3.11+
Version table:
*** 2:4.3.11+
500 http://
100 /var/lib/
The testparm command now works. It shows the config file, remarks that the "%U" file was ignored, and exits with status 0: trusty- samba-include- 1583324: ~$ sudo samba-tool testparm -d 2 smb.conf. %U but variable substitution in filename, ignoring file.
ubuntu@
lpcfg_load: refreshing parameters from /etc/samba/smb.conf
Tried to load /etc/samba/
Press enter to see a dump of your service definitions
# Global parameters snew\s* \spassword: * %n\n *Retype\ snew\s* \spassword: * %n\n *password\ supdated\ ssuccessfully* . samba/log. %m samba/panic- action %d smb.conf. %U trusty- samba-include- 1583324: ~$ echo $?
[global]
netbios name = SAMBA
server string = %h server (Samba, Ubuntu)
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\
unix password sync = Yes
log level = 2
log file = /var/log/
max log size = 1000
usershare allow guests = Yes
panic action = /usr/share/
idmap config * : backend = tdb
include = /etc/samba/
ubuntu@
0
Trusty verification complete.