Comment 15 for bug 1583324

Andreas Hasenack (ahasenack) wrote :

Trusty verification

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 complete.