This seems to be working in 4.3.11 that is in xenial:
root@xenial-samba-dynamic-include:~# testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Can't find include file /etc/samba/smb.conf.
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).
Server role: ROLE_STANDALONE
# Global parameters
[global]
server string = %h server (Samba, Ubuntu)
server role = standalone server
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
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
include = /etc/samba/smb.conf.
root@xenial-samba-dynamic-include:~# echo $?
0
Notice how it didn't expand %U, and the include file was /etc/samba/smb.conf. (ending dot). Restart works:
root@xenial-samba-dynamic-include:~# systemctl restart smbd nmbd
root@xenial-samba-dynamic-include:~# systemctl status smbd nmbd
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
Active: active (running) since Tue 2018-07-17 19:12:51 UTC; 3s ago
Docs: man:systemd-sysv-generator(8)
Process: 2983 ExecStop=/etc/init.d/smbd stop (code=exited, status=0/SUCCESS)
Process: 3012 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS)
Tasks: 3
Memory: 7.1M
CPU: 127ms
CGroup: /system.slice/smbd.service
├─3023 /usr/sbin/smbd -D
├─3024 /usr/sbin/smbd -D
└─3026 /usr/sbin/smbd -D
This seems to be working in 4.3.11 that is in xenial: samba-dynamic- include: ~# testparm -s smb.conf.
root@xenial-
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Can't find include file /etc/samba/
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).
Server role: ROLE_STANDALONE
# 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. samba-dynamic- include: ~# echo $?
[global]
server string = %h server (Samba, Ubuntu)
server role = standalone server
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
syslog = 0
log file = /var/log/
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/
idmap config * : backend = tdb
include = /etc/samba/
root@xenial-
0
Notice how it didn't expand %U, and the include file was /etc/samba/ smb.conf. (ending dot). Restart works: samba-dynamic- include: ~# systemctl restart smbd nmbd samba-dynamic- include: ~# systemctl status smbd nmbd sysv-generator( 8) /etc/init. d/smbd stop (code=exited, status=0/SUCCESS) /etc/init. d/smbd start (code=exited, status=0/SUCCESS) slice/smbd. service
root@xenial-
root@xenial-
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
Active: active (running) since Tue 2018-07-17 19:12:51 UTC; 3s ago
Docs: man:systemd-
Process: 2983 ExecStop=
Process: 3012 ExecStart=
Tasks: 3
Memory: 7.1M
CPU: 127ms
CGroup: /system.
├─3023 /usr/sbin/smbd -D
├─3024 /usr/sbin/smbd -D
└─3026 /usr/sbin/smbd -D
Jul 17 19:12:51 xenial- samba-dynamic- include systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)... samba-dynamic- include smbd[3012]: * Starting SMB/CIFS daemon smbd samba-dynamic- include smbd[3012]: ...done. samba-dynamic- include systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).
Jul 17 19:12:51 xenial-
Jul 17 19:12:51 xenial-
Jul 17 19:12:51 xenial-
● nmbd.service - LSB: start Samba NetBIOS nameserver (nmbd) sysv-generator( 8) /etc/init. d/nmbd stop (code=exited, status=0/SUCCESS) /etc/init. d/nmbd start (code=exited, status=0/SUCCESS) slice/nmbd. service
Loaded: loaded (/etc/init.d/nmbd; bad; vendor preset: enabled)
Active: active (running) since Tue 2018-07-17 19:12:51 UTC; 3s ago
Docs: man:systemd-
Process: 2990 ExecStop=
Process: 2998 ExecStart=
Tasks: 1
Memory: 3.7M
CPU: 127ms
CGroup: /system.
└─3011 /usr/sbin/nmbd -D
Jul 17 19:12:51 xenial- samba-dynamic- include systemd[1]: Starting LSB: start Samba NetBIOS nameserver (nmbd)... samba-dynamic- include nmbd[2998]: * Starting NetBIOS name server nmbd samba-dynamic- include nmbd[2998]: ...done. samba-dynamic- include systemd[1]: Started LSB: start Samba NetBIOS nameserver (nmbd).
Jul 17 19:12:51 xenial-
Jul 17 19:12:51 xenial-
Jul 17 19:12:51 xenial-
Are you also seeing this behavior now?