[Bug 1017919] New: using "include =" in smb.conf does not work on Leap 42.1
http://bugzilla.opensuse.org/show_bug.cgi?id=1017919 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: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1017919 http://bugzilla.opensuse.org/show_bug.cgi?id=1017919#c1 David Disseldorp <ddiss@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ddiss@suse.com, | |wagner-thomas@gmx.at Flags| |needinfo?(wagner-thomas@gmx | |.at) --- Comment #1 from David Disseldorp <ddiss@suse.com> --- Are you adding the "include =" parameter in the [global] section, or below a [share]? Judging by the testparm it's the latter. Could you try moving your "include" into the [global] section? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1017919 http://bugzilla.opensuse.org/show_bug.cgi?id=1017919#c2 Thomas Wagner <wagner-thomas@gmx.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(wagner-thomas@gmx | |.at) | --- Comment #2 from Thomas Wagner <wagner-thomas@gmx.at> --- I had it at the end (configuration worked in openSUSE 13.1 that way). If I put the "include = " in the [global] section I get the following errors: # 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 error opening config file '/etc/samba/smb.conf' Testparm is still fine, just [tmp] appears more early. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1017919 http://bugzilla.opensuse.org/show_bug.cgi?id=1017919#c3 Noel Power <nopower@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |nopower@suse.com Resolution|--- |WORKSFORME --- Comment #3 from Noel Power <nopower@suse.com> --- (In reply to Thomas Wagner from comment #2)
I had it at the end (configuration worked in openSUSE 13.1 that way). If I put the "include = " in the [global] section I get the following errors:
# 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 error opening config file '/etc/samba/smb.conf'
Testparm is still fine, just [tmp] appears more early.
apparmor is no doubt (at least on a sle system I see it causes the problems you see above) You either need to use a location that apparmor won't complain about (e.g. /etc/samba/ (but not a subdir)) or adjust the apparmor profiles to suit your needs I'm closing this as works for me (but feel free to reopen if moving the file or reconfiguring apparmor doesn't work) -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com