D. Joe Anderson
2001-Dec-06 15:50 UTC
workgroups not recognized in virtual server conf files
Hi, The documentation I've read indicates that I should be able to get Samba to honor the value of the 'workgroup' variable as set from within an included virtual server configuration file. Given the configuration files below, if I comment out the "workgroup = testwg" line from the main configuration file (smb.conf), then a query of the Samba server (with "smbclient -L test4 -U%") shows the server as being in the WORKGROUP workgroup, rather than the TESTWG workgroup that I specify in conf.test4. The server still responds, however, to the TEST4 netbios name as specified in the included conf.test4 file. The only thing I can see that might be amiss is the line Can't find include file /etc/samba/conf. When I run smbclient. I would appreciate any pointers as to how I might get the workgroup setting within the included file to be recognized. --Joe (If anyone is wondering why I bother with the 'netbios alias' line for just one netbios name, I tried this with three netbios aliases, expecting it to Just Work. This is a simplified example. If we can get this to work, I'll work my way back up ;-) $uname -a Linux xxx.xxx.iastate.edu 2.2.19-7.0.1 #1 Tue Apr 10 00:55:03 EDT 2001 i686 unknown # rpm -q samba samba-2.2.2-20011013 # cat smb.conf # Global parameters [global] workgroup = testwg netbios aliases = test4 include = /etc/samba/conf.%L # cat conf.test4 [global] workgroup = TESTWG netbios name = TEST4 os level = 128 domain master = yes local master = yes preferred master = yes security = user status = yes encrypt passwords = Yes update encrypted = Yes password level = 8 smb passwd file = /etc/samba/smbpasswd log file = /var/log/samba/%L log level = 4 max log size = 50 dns proxy = No wins server = xxx.xxx.xxx.xxx wins proxy = yes guest account = ftp
D. Joe Anderson
2001-Dec-07 07:18 UTC
workgroups not recognized in virtual server conf files
On Fri, Dec 07, 2001 at 12:21:04AM -0600, Daniel Wittenberg wrote:> Maybe I've missed something, but I'm curious why are have 2 config > files? Why not just move the conf.test4 to smb.conf? I assume you are > going to later be configuring multiple "servers"?In short, yes. I tried to say this in my original message. Sorry if I wasn't able to make it clear here:> > (If anyone is wondering why I bother with the 'netbios alias' line for just > > one netbios name, I tried this with three netbios aliases, expecting it to > > Just Work. This is a simplified example. If we can get this to work, I'll > > work my way back up ;-)Basically, I want to keep %L in there, and have each virtual server handle a different workgroup. But I can't get the workgroup setting read from any included files. I thought maybe the complexity of my original conf files was hiding something, so I pared it down to this much simpler example in hopes that I could get it to work and isolate my problem, but even this simple example doesn't work. This especially troubles me because as far as I can tell, it is nearly the same as the example given in "Running Samba" http://www.oreilly.com/catalog/samba/chapter/book/ch04_07.html I looked at this also with Samba 2.0.7 (instead of 2.2.2) and it behaves the same way, not picking up the workgroup setting from the included file, and in direct contradiction to the example given (unless I'm totally misreading that example on O'Reilly's site, and in my copy of their boo--I would be very happy to find out I missed something obvious!).> It looks like the > reason it can't find "/etc/samba/conf." is because the %L substitution > is missing the from the end - the "%L" part. I would guess this is > because you first specify "netbios alias".That error is from the instance of smbclient. I can get rid of it by specifying, for instance "smbclient -s /etc/samba/conf.test4" but the server side still fails to recognize the workgroup setting as I would expect given the example. Neither does specifying a workgroup from the client side (with -W) prompt the server to work within the proper workgroup. It's not just in the top part of the smbclient response this doesn't work, it also shows up further down in the body, where workgroups and their domain master browsers our listed--my server gets listed as being the domain master browser for the generic WORKGROUP rather than for the specified "testwg".> I would guess (never uesd > the aliases myself) that if you set the netbios name = test4 in the > main smb.conf, and then set netbios alias = test4 in the include file > that would work better. But, it doesn't make sense to me to use the %L, > since that is the netbios name, to define a virtual host for the netbios > server you've already created, to be able to use the name? So why not > just leave the smb.conf empty, and use "include = /etc/samba/conf.test4" > instead?because I want to put, for example, in smb.conf netbios alias = test3 test4 test5 include = /etc/samba/conf.%L and then have multiple configuration files conf.test3 conf.test4 conf.test5 etc, each in a different workgroup and with different settings. Some I'd like to get running as primary domain controllers, behaving as an NT PDC would, others just to help sync browse lists across networks disjoint to smb broadcast traffic, and so forth. I've got lots of different situations to handle, and not so many machines, so I could really, really use the flexibility of virtual servers, at least if I can get them to behave the way I think they should.> I wonder if the workgroup and netbios alias info in the > smb.conf is confusing things. So basically, I would say dump the > workgroup and netbios alias entries from the smb.conf, and change your > include line to include = /etc/samba/conf.test4, and see if that fixes > things.This works, if I only wanted to run one name. But I really do want to be able to run multiple virtual servers from one Samba process :-) The sad thing is, that the virtual servers all seem to behave otherwise--I can connect to each one of them in turn, they show up on browse lists, and otherwise behave as if they were running each on its own machine, except for the fact that they are in the WORKGROUP workgroup, rather than the one I specify (eg, testwg3 testwg4 testwg5) --Joe> Dan > > > > On Thu, 2001-12-06 at 17:48, D. Joe Anderson wrote: > > > > Hi, > > > > The documentation I've read indicates that I should be able to get Samba to > > honor the value of the 'workgroup' variable as set from within an included > > virtual server configuration file. > > > > Given the configuration files below, if I comment out the > > > > "workgroup = testwg" > > > > line from the main configuration file (smb.conf), then a query of > > the Samba server (with "smbclient -L test4 -U%") shows the server as being > > in the WORKGROUP workgroup, rather than the TESTWG workgroup that I specify > > in conf.test4. The server still responds, however, to the TEST4 netbios > > name as specified in the included conf.test4 file. > > > > The only thing I can see that might be amiss is the line > > > > Can't find include file /etc/samba/conf. > > > > When I run smbclient. > > > > I would appreciate any pointers as to how I might get the workgroup setting > > within the included file to be recognized. > > > > --Joe > > > > > > (If anyone is wondering why I bother with the 'netbios alias' line for just > > one netbios name, I tried this with three netbios aliases, expecting it to > > Just Work. This is a simplified example. If we can get this to work, I'll > > work my way back up ;-) > > > > $uname -a > > Linux xxx.xxx.iastate.edu 2.2.19-7.0.1 #1 Tue Apr 10 00:55:03 EDT 2001 > > i686 unknown > > > > # rpm -q samba > > samba-2.2.2-20011013 > > > > > > # cat smb.conf > > > > # Global parameters > > > > [global] > > workgroup = testwg > > netbios aliases = test4 > > include = /etc/samba/conf.%L > > > > > > > > # cat conf.test4 > > [global] > > workgroup = TESTWG > > netbios name = TEST4 > > os level = 128 > > domain master = yes > > local master = yes > > preferred master = yes > > security = user > > status = yes > > encrypt passwords = Yes > > update encrypted = Yes > > password level = 8 > > smb passwd file = /etc/samba/smbpasswd > > log file = /var/log/samba/%L > > log level = 4 > > max log size = 50 > > dns proxy = No > > wins server = xxx.xxx.xxx.xxx > > wins proxy = yes > > guest account = ftp > > > > >From the test4 log: > > > > 135 [2001/12/06 17:42:50, 3] param/params.c:pm_process(579) > > 136 params.c:pm_process() - Processing configuration file > > "/etc/samba/smb > > 136 .conf" > > 137 [2001/12/06 17:42:50, 3] param/loadparm.c:do_section(2884) > > 138 Processing section "[global]" > > 139 doing parameter netbios aliases = webtest4 > > 140 doing parameter include = /etc/samba/conf.%L > > 141 [2001/12/06 17:42:50, 3] param/params.c:pm_process(579) > > 142 params.c:pm_process() - Processing configuration file > > "/etc/samba/con > > 142 f.webtest4" > > 143 [2001/12/06 17:42:50, 3] param/loadparm.c:do_section(2884) > > 144 Processing section "[global]" > > 145 doing parameter workgroup = WEBTESTWG > > 146 doing parameter netbios name = WEBTEST4 > > 147 [2001/12/06 17:42:50, 4] param/loadparm.c:handle_netbios_name(2251) > > 148 handle_netbios_name: set global_myname to: WEBTEST4 > > 149 doing parameter os level = 128 > > 150 doing parameter domain master = yes > > > > # smbclient -L test4 -U% | less > > Can't find include file /etc/samba/conf. > > added interface ip=129.186.xxx.6 bcast=129.186.xxx.255 nmask=255.255.255.0 > > added interface ip=129.186.yyy.138 bcast=129.186.yyy.255 nmask=255.255.255.0 > > Got a positive name query response from 129.186.xxx.6 ( 129.186.xxx.6 ) > > Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.2] > > > > Sharename Type Comment > > --------- ---- ------- > > IPC$ IPC IPC Service (Samba 2.2.2) > > ADMIN$ Disk IPC Service (Samba 2.2.2) > > > > Server Comment > > --------- ------- > > TEST4 Samba 2.2.2 > > ANOTHERHOST Samba 2.2.2 > > > > Workgroup Master > > --------- ------- > > WORKGROUP > > > > > > ------------------------------------------------------------------------ > > CedarLUG/UNI - Linux Users Group. The choice of the new revolution. > > To unsubscribe, go to http://carbon.cfu.net/mailman/listinfo/cedarlug > > ------------------------------------------------------------------------ > > > > ------------------------------------------------------------------------ > CedarLUG/UNI - Linux Users Group. The choice of the new revolution. > To unsubscribe, go to http://carbon.cfu.net/mailman/listinfo/cedarlug > ------------------------------------------------------------------------ >-- ___________________________________________________________________________ D. Joe Anderson, Ph.D Computing Support for Botany, ZG, & BBMB. botsupport@iastate.edu | zgsupport@iastate.edu | bbsupport@iastate.edu 1210 MBB, ISU, Ames, IA 5001 http://www.bb.iastate.edu/support bcbsupport@iastate.edu .............. http://www.bcb.iastate.edu/bcblab
Daniel Wittenberg
2001-Dec-07 08:00 UTC
workgroups not recognized in virtual server conf files
You could try setting log level = 8 and see if that provides any more information ? Could this be of some help? If a machine is acting as a browse server or logon server none of these names will be advertised as either browse server or logon servers, only the primary name of the machine will be advertised with these capabili? ties. Also, I wonder about: "%L the NetBIOS name of the server..." - if this really works with netbios aliases as well. Dan
MCCALL,DON (HP-USA,ex1)
2001-Dec-07 08:00 UTC
workgroups not recognized in virtual server conf files
Hi Joe, The 'virtual server' concept is not really going to work for you in the way you want; the problem is that all of the broadcasting, advertising server/workgroupnames, etc is done by nmbd. While nmbd will broadcast/register/etc the netbios aliases, it is going to use only the smb.conf file, as the %L macro is only filled in at connection time (which means effectively, that only smbd is going to process include files with the %L macro). So while you COULD have netbios aliases that pointed to config files that did (for example) domain login, or share security, etc based on the netbios name that a pc is trying to connect as, all of your 'virtual machines' are going to be a member of the same 'workgroup', and that workgroup must be defined in the main smb.conf file, or as you have seen, it will just use the default 'WORKGROUP'. You might want to peruse the archives mailing lists for ideas on how other people have tried to work around this. Hope this helps, don -----Original Message----- From: D. Joe Anderson [mailto:deejoe@iastate.edu] Sent: Friday, December 07, 2001 10:16 AM To: Daniel Wittenberg Cc: cedarlug@cedarlug.org; aafugit@aafugit.org; samba@samba.org Subject: Re: workgroups not recognized in virtual server conf files On Fri, Dec 07, 2001 at 12:21:04AM -0600, Daniel Wittenberg wrote:> Maybe I've missed something, but I'm curious why are have 2 config > files? Why not just move the conf.test4 to smb.conf? I assume you are > going to later be configuring multiple "servers"?In short, yes. I tried to say this in my original message. Sorry if I wasn't able to make it clear here:> > (If anyone is wondering why I bother with the 'netbios alias' line forjust> > one netbios name, I tried this with three netbios aliases, expecting itto> > Just Work. This is a simplified example. If we can get this to work,I'll> > work my way back up ;-)Basically, I want to keep %L in there, and have each virtual server handle a different workgroup. But I can't get the workgroup setting read from any included files. I thought maybe the complexity of my original conf files was hiding something, so I pared it down to this much simpler example in hopes that I could get it to work and isolate my problem, but even this simple example doesn't work. This especially troubles me because as far as I can tell, it is nearly the same as the example given in "Running Samba" http://www.oreilly.com/catalog/samba/chapter/book/ch04_07.html I looked at this also with Samba 2.0.7 (instead of 2.2.2) and it behaves the same way, not picking up the workgroup setting from the included file, and in direct contradiction to the example given (unless I'm totally misreading that example on O'Reilly's site, and in my copy of their boo--I would be very happy to find out I missed something obvious!).> It looks like the > reason it can't find "/etc/samba/conf." is because the %L substitution > is missing the from the end - the "%L" part. I would guess this is > because you first specify "netbios alias".That error is from the instance of smbclient. I can get rid of it by specifying, for instance "smbclient -s /etc/samba/conf.test4" but the server side still fails to recognize the workgroup setting as I would expect given the example. Neither does specifying a workgroup from the client side (with -W) prompt the server to work within the proper workgroup. It's not just in the top part of the smbclient response this doesn't work, it also shows up further down in the body, where workgroups and their domain master browsers our listed--my server gets listed as being the domain master browser for the generic WORKGROUP rather than for the specified "testwg".> I would guess (never uesd > the aliases myself) that if you set the netbios name = test4 in the > main smb.conf, and then set netbios alias = test4 in the include file > that would work better. But, it doesn't make sense to me to use the %L, > since that is the netbios name, to define a virtual host for the netbios > server you've already created, to be able to use the name? So why not > just leave the smb.conf empty, and use "include = /etc/samba/conf.test4" > instead?because I want to put, for example, in smb.conf netbios alias = test3 test4 test5 include = /etc/samba/conf.%L and then have multiple configuration files conf.test3 conf.test4 conf.test5 etc, each in a different workgroup and with different settings. Some I'd like to get running as primary domain controllers, behaving as an NT PDC would, others just to help sync browse lists across networks disjoint to smb broadcast traffic, and so forth. I've got lots of different situations to handle, and not so many machines, so I could really, really use the flexibility of virtual servers, at least if I can get them to behave the way I think they should.> I wonder if the workgroup and netbios alias info in the > smb.conf is confusing things. So basically, I would say dump the > workgroup and netbios alias entries from the smb.conf, and change your > include line to include = /etc/samba/conf.test4, and see if that fixes > things.This works, if I only wanted to run one name. But I really do want to be able to run multiple virtual servers from one Samba process :-) The sad thing is, that the virtual servers all seem to behave otherwise--I can connect to each one of them in turn, they show up on browse lists, and otherwise behave as if they were running each on its own machine, except for the fact that they are in the WORKGROUP workgroup, rather than the one I specify (eg, testwg3 testwg4 testwg5) --Joe> Dan > > > > On Thu, 2001-12-06 at 17:48, D. Joe Anderson wrote: > > > > Hi, > > > > The documentation I've read indicates that I should be able to get Sambato> > honor the value of the 'workgroup' variable as set from within anincluded> > virtual server configuration file. > > > > Given the configuration files below, if I comment out the > > > > "workgroup = testwg" > > > > line from the main configuration file (smb.conf), then a query of > > the Samba server (with "smbclient -L test4 -U%") shows the server asbeing> > in the WORKGROUP workgroup, rather than the TESTWG workgroup that Ispecify> > in conf.test4. The server still responds, however, to the TEST4 netbios > > name as specified in the included conf.test4 file. > > > > The only thing I can see that might be amiss is the line > > > > Can't find include file /etc/samba/conf. > > > > When I run smbclient. > > > > I would appreciate any pointers as to how I might get the workgroupsetting> > within the included file to be recognized. > > > > --Joe > > > > > > (If anyone is wondering why I bother with the 'netbios alias' line forjust> > one netbios name, I tried this with three netbios aliases, expecting itto> > Just Work. This is a simplified example. If we can get this to work,I'll> > work my way back up ;-) > > > > $uname -a > > Linux xxx.xxx.iastate.edu 2.2.19-7.0.1 #1 Tue Apr 10 00:55:03 EDT 2001 > > i686 unknown > > > > # rpm -q samba > > samba-2.2.2-20011013 > > > > > > # cat smb.conf > > > > # Global parameters > > > > [global] > > workgroup = testwg > > netbios aliases = test4 > > include = /etc/samba/conf.%L > > > > > > > > # cat conf.test4 > > [global] > > workgroup = TESTWG > > netbios name = TEST4 > > os level = 128 > > domain master = yes > > local master = yes > > preferred master = yes > > security = user > > status = yes > > encrypt passwords = Yes > > update encrypted = Yes > > password level = 8 > > smb passwd file = /etc/samba/smbpasswd > > log file = /var/log/samba/%L > > log level = 4 > > max log size = 50 > > dns proxy = No > > wins server = xxx.xxx.xxx.xxx > > wins proxy = yes > > guest account = ftp > > > > >From the test4 log: > > > > 135 [2001/12/06 17:42:50, 3] param/params.c:pm_process(579) > > 136 params.c:pm_process() - Processing configuration file > > "/etc/samba/smb > > 136 .conf" > > 137 [2001/12/06 17:42:50, 3] param/loadparm.c:do_section(2884) > > 138 Processing section "[global]" > > 139 doing parameter netbios aliases = webtest4 > > 140 doing parameter include = /etc/samba/conf.%L > > 141 [2001/12/06 17:42:50, 3] param/params.c:pm_process(579) > > 142 params.c:pm_process() - Processing configuration file > > "/etc/samba/con > > 142 f.webtest4" > > 143 [2001/12/06 17:42:50, 3] param/loadparm.c:do_section(2884) > > 144 Processing section "[global]" > > 145 doing parameter workgroup = WEBTESTWG > > 146 doing parameter netbios name = WEBTEST4 > > 147 [2001/12/06 17:42:50, 4]param/loadparm.c:handle_netbios_name(2251)> > 148 handle_netbios_name: set global_myname to: WEBTEST4 > > 149 doing parameter os level = 128 > > 150 doing parameter domain master = yes > > > > # smbclient -L test4 -U% | less > > Can't find include file /etc/samba/conf. > > added interface ip=129.186.xxx.6 bcast=129.186.xxx.255nmask=255.255.255.0> > added interface ip=129.186.yyy.138 bcast=129.186.yyy.255nmask=255.255.255.0> > Got a positive name query response from 129.186.xxx.6 ( 129.186.xxx.6 ) > > Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.2] > > > > Sharename Type Comment > > --------- ---- ------- > > IPC$ IPC IPC Service (Samba 2.2.2) > > ADMIN$ Disk IPC Service (Samba 2.2.2) > > > > Server Comment > > --------- ------- > > TEST4 Samba 2.2.2 > > ANOTHERHOST Samba 2.2.2 > > > > Workgroup Master > > --------- ------- > > WORKGROUP > > > > > > ------------------------------------------------------------------------ > > CedarLUG/UNI - Linux Users Group. The choice of the new revolution. > > To unsubscribe, go to http://carbon.cfu.net/mailman/listinfo/cedarlug > > ------------------------------------------------------------------------ > > > > ------------------------------------------------------------------------ > CedarLUG/UNI - Linux Users Group. The choice of the new revolution. > To unsubscribe, go to http://carbon.cfu.net/mailman/listinfo/cedarlug > ------------------------------------------------------------------------ >-- ___________________________________________________________________________ D. Joe Anderson, Ph.D Computing Support for Botany, ZG, & BBMB. botsupport@iastate.edu | zgsupport@iastate.edu | bbsupport@iastate.edu 1210 MBB, ISU, Ames, IA 5001 http://www.bb.iastate.edu/support bcbsupport@iastate.edu .............. http://www.bcb.iastate.edu/bcblab -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Herb Lewis
2002-Oct-28 23:44 UTC
[Samba] Re: workgroups not recognized in virtual server conf files
You might want to upgrade to a newer version of samba. This works for me with samba 2.2.4 and 2.2.6 D. Joe Anderson wrote:> Hi, > > The documentation I've read indicates that I should be able to get Samba to > honor the value of the 'workgroup' variable as set from within an included > virtual server configuration file. > > Given the configuration files below, if I comment out the > > "workgroup = testwg" > > line from the main configuration file (smb.conf), then a query of > the Samba server (with "smbclient -L test4 -U%") shows the server as being > in the WORKGROUP workgroup, rather than the TESTWG workgroup that I specify > in conf.test4. The server still responds, however, to the TEST4 netbios > name as specified in the included conf.test4 file. > > The only thing I can see that might be amiss is the line > > Can't find include file /etc/samba/conf. > > When I run smbclient. > > I would appreciate any pointers as to how I might get the workgroup setting > within the included file to be recognized. > > --Joe > > > (If anyone is wondering why I bother with the 'netbios alias' line for just > one netbios name, I tried this with three netbios aliases, expecting it to > Just Work. This is a simplified example. If we can get this to work, I'll > work my way back up ;-) > > $uname -a > Linux xxx.xxx.iastate.edu 2.2.19-7.0.1 #1 Tue Apr 10 00:55:03 EDT 2001 > i686 unknown > > # rpm -q samba > samba-2.2.2-20011013 > > > # cat smb.conf > > # Global parameters > > [global] > workgroup = testwg > netbios aliases = test4 > include = /etc/samba/conf.%L > > > > # cat conf.test4 > [global] > workgroup = TESTWG > netbios name = TEST4 > os level = 128 > domain master = yes > local master = yes > preferred master = yes > security = user > status = yes > encrypt passwords = Yes > update encrypted = Yes > password level = 8 > smb passwd file = /etc/samba/smbpasswd > log file = /var/log/samba/%L > log level = 4 > max log size = 50 > dns proxy = No > wins server = xxx.xxx.xxx.xxx > wins proxy = yes > guest account = ftp > >>From the test4 log: > > 135 [2001/12/06 17:42:50, 3] param/params.c:pm_process(579) > 136 params.c:pm_process() - Processing configuration file > "/etc/samba/smb > 136 .conf" > 137 [2001/12/06 17:42:50, 3] param/loadparm.c:do_section(2884) > 138 Processing section "[global]" > 139 doing parameter netbios aliases = webtest4 > 140 doing parameter include = /etc/samba/conf.%L > 141 [2001/12/06 17:42:50, 3] param/params.c:pm_process(579) > 142 params.c:pm_process() - Processing configuration file > "/etc/samba/con > 142 f.webtest4" > 143 [2001/12/06 17:42:50, 3] param/loadparm.c:do_section(2884) > 144 Processing section "[global]" > 145 doing parameter workgroup = WEBTESTWG > 146 doing parameter netbios name = WEBTEST4 > 147 [2001/12/06 17:42:50, 4] param/loadparm.c:handle_netbios_name(2251) > 148 handle_netbios_name: set global_myname to: WEBTEST4 > 149 doing parameter os level = 128 > 150 doing parameter domain master = yes > > # smbclient -L test4 -U% | less > Can't find include file /etc/samba/conf. > added interface ip=129.186.xxx.6 bcast=129.186.xxx.255 nmask=255.255.255.0 > added interface ip=129.186.yyy.138 bcast=129.186.yyy.255 nmask=255.255.255.0 > Got a positive name query response from 129.186.xxx.6 ( 129.186.xxx.6 ) > Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.2] > > Sharename Type Comment > --------- ---- ------- > IPC$ IPC IPC Service (Samba 2.2.2) > ADMIN$ Disk IPC Service (Samba 2.2.2) > > Server Comment > --------- ------- > TEST4 Samba 2.2.2 > ANOTHERHOST Samba 2.2.2 > > Workgroup Master > --------- ------- > WORKGROUP > >-- =====================================================================Herb Lewis Silicon Graphics Networking Engineer 1600 Amphitheatre Pkwy MS-510 Strategic Software Organization Mountain View, CA 94043-1351 herb@sgi.com Tel: 650-933-2177 http://www.sgi.com Fax: 650-932-2177 PGP Key: 0x8408D65D ======================================================================