Hi, I've been wondering about the "config file" option in smb.conf. config file (G) This allows you to override the config file to use, instead of the default (usually smb.conf). There is a chicken and egg problem here as this option is set in the config file! For this reason, if the name of the config file has changed when the parameters are loaded then it will reload them from the new config file. This option takes the usual substitutions, which can be very useful. If the config file doesn't exist then it won't be loaded (allowing you to special case the config files of just a few clients). Example: config file /usr/local/samba/lib/smb.conf.%m OK, so I can have settings for multiple names, in multiple files, etc. Here's my question: Can I have one file that contains all of my defaults and a few others that contain additions, or do I need to copy all of my defaults into each possible config file? In other words: When you load the new config file from the previous, are the options from the previous config file still in effect when you load the new config file? In other words: smb.conf sets shares x, y, and z. smb.conf.2 sets shares a, b, c, and d. When smb.conf loads smb.conf.2, will I get shares a, b, c, d, x, y, and z? BTW, what happens if smb.conf references to smb.conf.2 and references to smb.conf.3? Is there a limit? Not that I have a use for this, but it's interesting to know. -- Mike Fedyk "They that can give up essential liberty Information Systems to obtain a little temporary safety Match Mail Productions Inc. deserve neither liberty nor safety." mfedyk@matchmail.com Ben Franklin
* Mike Fedyk <mfedyk@matchmail.com> [20001025 11:01]: =>Hi, => Example: config file => /usr/local/samba/lib/smb.conf.%m => =>OK, so I can have settings for multiple names, in multiple files, etc. Yes, typically virtual names pointing to the same samba server but with different rules. => =>Here's my question: =>Can I have one file that contains all of my defaults and a few others that =>contain additions, or do I need to copy all of my defaults into each possible =>config file? I think the former is TRUE - one file with all defaults and a few others that contain additions. It works for me. => =>In other words: =>When you load the new config file from the previous, are the options from the =>previous config file still in effect when you load the new config file? Yes, unless you put overrides in the new one. =>In other words: =>smb.conf sets shares x, y, and z. smb.conf.2 sets shares a, b, c, and d. When =>smb.conf loads smb.conf.2, will I get shares a, b, c, d, x, y, and z? => But curiously I think the essence of a second config file was to have a 'virtual' server so my view is that you get x,y,z in the 'real' samba server and a,b,c and d in the 'virtual' =>BTW, what happens if smb.conf references to smb.conf.2 and references to =>smb.conf.3? Is there a limit? Not that I have a use for this, but it's =>interesting to know. I have not tested it myself. Pls buy the book "Using Samba" and make reference but if you're as poor as me, then try to take a look at htpp://sunsite.auc.dk/samba/oreilly/using_samba/ - that is where I got the idea. See if they say there is a limit and include me in your findings. NB: Whatever I've written only represents my little understanding and might not represent the true status of the samba functionality ;-) -Wash -- Odhiambo Washington Inter-Connect Ltd., wash@iconnect.co.ke 5th Flr Furaha Plaza Tel: 254 11 222604 Nkrumah Rd., Fax: 254 11 222636 PO Box 83613 MOMBASA, KENYA. To know is to know that you know nothing. That is the meaning of true knowledge. -Confucius
Mike, On Tue, 24 Oct 2000 11:18:41 -0700, Mike Fedyk wrote:>I've been wondering about the "config file" option in smb.conf.>OK, so I can have settings for multiple names, in multiple files, >etc. > >Here's my question: >Can I have one file that contains all of my defaults and a few others >that contain additions, or do I need to copy all of my defaults into >each possible config file?You don't want "config file", you want "include". :-) Put your defaults into smb.conf.default and include this one from all of your specialized smb.conf's. "include" is nestable. Regards, Robert -- --------------------------------------------------------------- Robert.Dahlem@gmx.net Fax +49-69-432647 --------------------------------------------------------------- Sent using PMMail (http://www.pmmail2000.com) - fast, decent, email software; far better than Outlook. Try it sometime.