I have a fairly large config file, with separate include statements for most main sections, including shares. Sometimes, include statements appear in the middle of the previous section, resulting in certain options not working properly, for example root preexec in the [homes] share just doesn't run. Once the include lines are removed from smb.conf, the root preexec works. Here's a snippit on the testparm-generated smb.conf [profiles] path = /usr/local/fhs/profiles/ invalid users = sweepupd read only = No force create mode = 0600 force directory mode = 02700 profile acls = Yes case sensitive = No delete veto files = Yes veto files = /thumbs\.db/desktop\.ini/aquota.*/ browseable = No csc policy = disable include = /etc/samba/shares/homes.share.conf root preexec = /usr/local/fhs/bin/mk-profiledir %u %d %a %m %I delete readonly = Yes [homes] comment = Your curric home drive (%U) path = /usr/local/fhs/users/%U valid users = %S read only = No create mask = 0640 directory mask = 0750 max connections = 4 delete veto files = Yes veto files = /*.scr/*.dll/desktop.ini/*porn*/*.exe/ browseable = No csc policy = disable include = /etc/samba/printing/point-and-print.share.conf root preexec = /usr/local/fhs/bin/mk-admin-homedir "%S" delete readonly = Yes [print$] comment = Printer Drivers path = /usr/local/samba/printer-drivers/ I realise this is related to issue 4271, however I've never noticed it causing any actual errors until today. https://bugzilla.samba.org/show_bug.cgi?id=4271
Hi, Of course a config as the one you listed, is problematic. When you include a file in the middle of a share definition [homes] and the include file starts a new section, then the parameters following the include (root preexec) will not be assigned to the original share any more. In order to evaluate if this is just an instance of bug #4271, which I expect, can you please post your original smb.conf + the include files? Thanks - Michael (In reply to comment #0) > I have a fairly large config file, with separate include statements for most > main sections, including shares. Sometimes, include statements appear in the > middle of the previous section, resulting in certain options not working > properly, for example root preexec in the [homes] share just doesn't run. > Once the include lines are removed from smb.conf, the root preexec works. > > Here's a snippit on the testparm-generated smb.conf > > [profiles] > path = /usr/local/fhs/profiles/ > invalid users = sweepupd > read only = No > force create mode = 0600 > force directory mode = 02700 > profile acls = Yes > case sensitive = No > delete veto files = Yes > veto files = /thumbs\.db/desktop\.ini/aquota.*/ > browseable = No > csc policy = disable > include = /etc/samba/shares/homes.share.conf > root preexec = /usr/local/fhs/bin/mk-profiledir %u %d %a %m %I > delete readonly = Yes > > [homes] > comment = Your curric home drive (%U) > path = /usr/local/fhs/users/%U > valid users = %S > read only = No > create mask = 0640 > directory mask = 0750 > max connections = 4 > delete veto files = Yes > veto files = /*.scr/*.dll/desktop.ini/*porn*/*.exe/ > browseable = No > csc policy = disable > include = /etc/samba/printing/point-and-print.share.conf > root preexec = /usr/local/fhs/bin/mk-admin-homedir "%S" > delete readonly = Yes > > [print$] > comment = Printer Drivers > path = /usr/local/samba/printer-drivers/ > > > > I realise this is related to issue 4271, however I've never noticed it causing > any actual errors until today. https://bugzilla.samba.org/show_bug.cgi?id=4271 >
Created attachment 4115 [details] samba config with include files
Hi Michael Please find attached config files. smb.conf is the filtered one that we have to use, i.e. testparm -s smb-master.conf | grep -v include > smb.conf smb.conf-unfiltered is the raw one that was causing the problems. Each include file relates to a separate section. The reason I suspect this is a bug, is because testparm seems to be mixing them into the other sections. Ant
Hi Ant, sorry for coming back late to your issue. This is the same as bug #4271, which is fixed in 3.4 and won't be fixed in 3.3 any more? Can you upgrade to 3.4? or Live with your include filter until you can upgrade? cheers - Michael *** This bug has been marked as a duplicate of bug 4271 ***