Bug ID 1017919
Summary using "include =" in smb.conf does not work on Leap 42.1
Classification openSUSE
Product openSUSE Distribution
Version Leap 42.1
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Samba
Assignee samba-maintainers@SuSE.de
Reporter wagner-thomas@gmx.at
QA Contact samba-maintainers@SuSE.de
Found By ---
Blocker ---

Hi,

On Leap 42.1 the "include =" statement in smb.conf seems to be not working. 

For test-purposes I used this simple config file:
# cat /etc/samba/users/thomas.conf 
[tmp]
        comment = test tmp
        path = /tmp

In /etc/samba/smb.conf I added the following line:
include = /etc/samba/users/thomas.conf

Then I restarted samba with "systemctl restart smb", however smbd crashed
immediately with "Failed to start Samba SMB Daemon." in the systemd log.


Starting smbd in interactive mode to see possible error won't show the share
[tmp]
# smbd -i -d 2
smbd version 4.2.4-21.3-3689-SUSE-SLE_12-x86_64 started.
Copyright Andrew Tridgell and the Samba Team 1992-2014
uid=0 gid=0 euid=0 egid=0
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Can't find include file /etc/samba/dhcp.conf
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Can't find include file /etc/samba/dhcp.conf
Processing section "[homes]"
Processing section "[profiles]"
Processing section "[users]"
Processing section "[groups]"
Processing section "[printers]"
Processing section "[print$]"
added interface eth0 ip=192.168.7.107 bcast=192.168.7.255 netmask=255.255.255.0


testparm won't find an error but does show [tmp]
# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Can't find include file /etc/samba/dhcp.conf
Processing section "[homes]"
Processing section "[profiles]"
Processing section "[users]"
Processing section "[groups]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[tmp]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        map to guest = Bad User
        printcap name = cups
        logon path = \\%L\profiles\.msprofile
        logon drive = P:
        logon home = \\%L\%U\.9xprofile
        usershare allow guests = Yes
        idmap config * : backend = tdb
        cups options = raw
        include = /etc/samba/dhcp.conf


[homes]
        comment = Home Directories
        valid users = %S %D%w%S
        read only = No
        inherit acls = Yes
        browseable = No


[profiles]
        comment = Network Profiles Service
        path = %H
        read only = No
        create mask = 0600
        directory mask = 0700
        store dos attributes = Yes


[users]
        comment = All users
        path = /home
        read only = No
        inherit acls = Yes
        veto files = /aquota.user/groups/shares/


[groups]
        comment = All groups
        path = /home/groups
        read only = No
        inherit acls = Yes


[printers]
        comment = All Printers
        path = /var/tmp
        create mask = 0600
        printable = Yes
        print ok = Yes
        browseable = No


[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @ntadmin root
        force group = ntadmin
        create mask = 0664
        directory mask = 0775
        include = /etc/samba/users/thomas.conf


[tmp]
        comment = test tmp
        path = /tmp




When I copy the content of /etc/samba/users/thomas.conf to smb.conf (read: do
manually what "include =" is supposed to do). It works. Samba starts and I can
access /tmp.

Using 
 include = /etc/samba/users/%U.conf
instead of 
 include = /etc/samba/users/thomas.conf
will allow smb to start but /tmp won't be serverd.


TL;DR With Samba 4.2.4 on Leap 42.1 "include =" cannot be used in smb.conf

Best regards

Thomas


You are receiving this mail because: