|
From: André Welter on 19 Jun 2008 11:30 André Welter schrieb: > Hi list! > > I've read some remarks here and in other places that it would be good > practice to not edit the smb.conf file directly but rather keep a > smb.conf.master file, edit that and then do a testparm -s > smb.conf. > > Here comes my problem: > > My smb.conf file uses some include statements. When using testparm those > include lines are still in the output directly followed by the content > of the included file. This would lead to a kind of double inclusion if I > used the output of testparm as my new smb.conf. > Is this intentional? > > Thx, > > André > > > Sorry, I forgot to mention, this only happens with the second level of includes. Here is an example: smb.conf: [global] server string = myserver encrypt passwords = yes obey pam restrictions = no workgroup = myworkgroup enable privileges = yes security = user passdb backend = smbpasswd include=includes.smb [print$] path = /etc/samba/printer/ browsable = yes guest ok = yes read only = yes includes.smb: include=smbopts.share1 include=smbopts.share2 smbopts.share1: [share1] path = /data/share1 guest ok = yes smbopts.share2: [share2] path = /data/share2 guest ok = yes and what testparm makes of it: Load smb config files from smb.conf Processing section "[share1]" Processing section "[share2]" Processing section "[print$]" Loaded services file OK. Server role: ROLE_STANDALONE [global] workgroup = MYWORKGROUP server string = myserver include = smbopts.share1 [share1] path = /data/share1 guest ok = Yes include = smbopts.share2 [share2] path = /data/share2 [print$] path = /etc/samba/printer/ guest ok = Yes -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
From: John H Terpstra on 19 Jun 2008 11:40 On Thursday 19 June 2008 10:21:22 André Welter wrote: > André Welter schrieb: > > Hi list! > > > > I've read some remarks here and in other places that it would be good > > practice to not edit the smb.conf file directly but rather keep a > > smb.conf.master file, edit that and then do a testparm -s > smb.conf. > > > > Here comes my problem: > > > > My smb.conf file uses some include statements. When using testparm those > > include lines are still in the output directly followed by the content > > of the included file. This would lead to a kind of double inclusion if I > > used the output of testparm as my new smb.conf. > > Is this intentional? Yes, this behavior is intentional. The testparm utility is designed to produce the total picture presented by a fully parsed smb.conf file. - John T. > > > > Thx, > > > > André > > Sorry, I forgot to mention, this only happens with the second level of > includes. Here is an example: > > smb.conf: > [global] > server string = myserver > encrypt passwords = yes > obey pam restrictions = no > workgroup = myworkgroup > enable privileges = yes > security = user > passdb backend = smbpasswd > include=includes.smb > > [print$] > path = /etc/samba/printer/ > browsable = yes > guest ok = yes > read only = yes > > > includes.smb: > include=smbopts.share1 > include=smbopts.share2 > > > smbopts.share1: > [share1] > path = /data/share1 > guest ok = yes > > > smbopts.share2: > [share2] > path = /data/share2 > guest ok = yes > > > and what testparm makes of it: > Load smb config files from smb.conf > Processing section "[share1]" > Processing section "[share2]" > Processing section "[print$]" > Loaded services file OK. > Server role: ROLE_STANDALONE > [global] > workgroup = MYWORKGROUP > server string = myserver > include = smbopts.share1 > > [share1] > path = /data/share1 > guest ok = Yes > include = smbopts.share2 > > [share2] > path = /data/share2 > > [print$] > path = /etc/samba/printer/ > guest ok = Yes -- John H Terpstra Samba-Team Member Phone: +1 (512) 970-0256 Author: The Official Samba-3 HOWTO & Reference Guide, 2 Ed., ISBN: 0131882228 Samba-3 by Example, 2 Ed., ISBN: 0131882221X Hardening Linux, ISBN: 0072254971 Other books in production. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
From: André Welter on 20 Jun 2008 03:10 John H Terpstra schrieb: > On Thursday 19 June 2008 10:21:22 André Welter wrote: > >> André Welter schrieb: >> >>> Hi list! >>> >>> I've read some remarks here and in other places that it would be good >>> practice to not edit the smb.conf file directly but rather keep a >>> smb.conf.master file, edit that and then do a testparm -s > smb.conf. >>> >>> Here comes my problem: >>> >>> My smb.conf file uses some include statements. When using testparm those >>> include lines are still in the output directly followed by the content >>> of the included file. This would lead to a kind of double inclusion if I >>> used the output of testparm as my new smb.conf. >>> Is this intentional? >>> > > Yes, this behavior is intentional. The testparm utility is designed to > produce the total picture presented by a fully parsed smb.conf file. > > - John T. > > Thanks for your reply and sorry for insisting. But what use does it have if the include statements are shown in the fully parsed smb.conf right next to the content of the included files? Wouldn't it be cleaner to just replace the include statements with the content that is included? Thanks again for your time. >>> Thx, >>> >>> André >>> >> Sorry, I forgot to mention, this only happens with the second level of >> includes. Here is an example: >> >> smb.conf: >> [global] >> server string = myserver >> encrypt passwords = yes >> obey pam restrictions = no >> workgroup = myworkgroup >> enable privileges = yes >> security = user >> passdb backend = smbpasswd >> include=includes.smb >> >> [print$] >> path = /etc/samba/printer/ >> browsable = yes >> guest ok = yes >> read only = yes >> >> >> includes.smb: >> include=smbopts.share1 >> include=smbopts.share2 >> >> >> smbopts.share1: >> [share1] >> path = /data/share1 >> guest ok = yes >> >> >> smbopts.share2: >> [share2] >> path = /data/share2 >> guest ok = yes >> >> >> and what testparm makes of it: >> Load smb config files from smb.conf >> Processing section "[share1]" >> Processing section "[share2]" >> Processing section "[print$]" >> Loaded services file OK. >> Server role: ROLE_STANDALONE >> [global] >> workgroup = MYWORKGROUP >> server string = myserver >> include = smbopts.share1 >> >> [share1] >> path = /data/share1 >> guest ok = Yes >> include = smbopts.share2 >> >> [share2] >> path = /data/share2 >> >> [print$] >> path = /etc/samba/printer/ >> guest ok = Yes >> > > > > -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
From: Helmut Hullen on 20 Jun 2008 03:20 Hallo, Andr�, Du (welter) meintest am 20.06.08: > John H Terpstra schrieb: >> On Thursday 19 June 2008 10:21:22 Andr� Welter wrote: >> >>> Andr� Welter schrieb: >>> >>>> Hi list! >>>> >>>> I've read some remarks here and in other places that it would be >>>> good practice to not edit the smb.conf file directly but rather >>>> keep a smb.conf.master file, edit that and then do a testparm -s > >>>> smb.conf. >>>> >>>> Here comes my problem: >>>> >>>> My smb.conf file uses some include statements. When using testparm >>>> those include lines are still in the output directly followed by >>>> the content of the included file. This would lead to a kind of >>>> double inclusion if I used the output of testparm as my new >>>> smb.conf. Is this intentional? >>>> >> >> Yes, this behavior is intentional. The testparm utility is designed >> to produce the total picture presented by a fully parsed smb.conf >> file. >> >> - John T. >> >> > Thanks for your reply and sorry for insisting. > But what use does it have if the include statements are shown in the > fully parsed smb.conf right next to the content of the included > files? Wouldn't it be cleaner to just replace the include statements > with the content that is included? > Thanks again for your time. >>>> Thx, >>>> >>>> Andr� >>>> >>> Sorry, I forgot to mention, this only happens with the second level >>> of includes. Here is an example: >>> >>> smb.conf: >>> [global] >>> server string = myserver >>> encrypt passwords = yes >>> obey pam restrictions = no >>> workgroup = myworkgroup >>> enable privileges = yes >>> security = user >>> passdb backend = smbpasswd >>> include=includes.smb >>> >>> [print$] >>> path = /etc/samba/printer/ >>> browsable = yes >>> guest ok = yes >>> read only = yes >>> >>> >>> includes.smb: >>> include=smbopts.share1 >>> include=smbopts.share2 >>> >>> >>> smbopts.share1: >>> [share1] >>> path = /data/share1 >>> guest ok = yes >>> >>> >>> smbopts.share2: >>> [share2] >>> path = /data/share2 >>> guest ok = yes >>> >>> >>> and what testparm makes of it: >>> Load smb config files from smb.conf >>> Processing section "[share1]" >>> Processing section "[share2]" >>> Processing section "[print$]" >>> Loaded services file OK. >>> Server role: ROLE_STANDALONE >>> [global] >>> workgroup = MYWORKGROUP >>> server string = myserver >>> include = smbopts.share1 >>> >>> [share1] >>> path = /data/share1 >>> guest ok = Yes >>> include = smbopts.share2 >>> >>> [share2] >>> path = /data/share2 >>> >>> [print$] >>> path = /etc/samba/printer/ >>> guest ok = Yes >>> >> >> >> >> Dont full quote - please! Thank you! Viele Gruesse! Helmut -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
|
Pages: 1 Prev: [Samba] idmap_ad - Unix attributes vs. Windows attributes vs. Winbind Next: slow samba |