Operating System - HP-UX
1830207 Members
2187 Online
109999 Solutions
New Discussion

Configuring Samba Virtual Servers

 
Brian King
Advisor

Configuring Samba Virtual Servers

I'm having difficulty with configuring Samba virtual servers. Technically, I have all but one "featue" working properly. The hurdle that I've run into is with using the "%L" variable to specify an include file based on the NetBIOS name being called by a client. A client can reach the Samba server by specifying one of the three "virtual host names", all three being bound to the same network card on the server. In the global section of the smb.conf file, the following entry has been added:

include = /etc/opt/samba/smb.conf.%L

When viewing the logs, the %L has no value and thus the include file is translatted to /etc/opt/samba/smb.conf. without the NetBIOS name (%L) being appended to it.

Any help would be appreciated.
5 REPLIES 5
harry d brown jr
Honored Contributor

Re: Configuring Samba Virtual Servers


Do you have netbios aliases set??

http://www.oreilly.com/catalog/samba/chapter/book/ch04_01.html


live free or die
harry
Live Free or Die
Brian King
Advisor

Re: Configuring Samba Virtual Servers

Yes. I have actually tested with the netbios aliases set, not set, and have switched the order of the entries in the netbios aliases list. It seems that the only time I get any positive results, is with the first entry in the netbios aliases list.
harry d brown jr
Honored Contributor

Re: Configuring Samba Virtual Servers

So your netbios command looked like this:

netbios aliases = domain1 domain2 domain3

replacing your domain#'s with real names of course.

live free or die
harry
Live Free or Die
Brian King
Advisor

Re: Configuring Samba Virtual Servers

Yes, close anyway. It looks a little more like this:

netbios name = domain1
netbios aliases = domain2

Brian King
Advisor

Re: Configuring Samba Virtual Servers

This item is now closed.

Here is the resolution to my problem:

- The %L variable does NOT
work with the "root" or
with the "root dir" or
with the "root directory"
options.

- The %L variable does work
with the "include" and the
"config file" options.

- Unique Samba config files
can be read, using the
"include" or "config file"
options combined with a
variable, such as; %m
for the client name or %L
for the NetBIOS name.

- Trying to perform a chroot
by using the "root", "root
dir", or "root directory"
option will ONLY work if
it is part of the initial
Samba config file that is
read.

- In order to utilize multi
unique config files based
on the NetBIOS name, you
have to run a pair of the
Samba daemons (smbd, nmbd)
for each of the NetBIOS
names associated with the
server that Samba is on.
Each daemon will need to
include the -s option
pointing to the correct
Samba config file for that
NetBIOS instance. The
option "lock directory"
will need to point to a
unique location (dir) as
well.

- A "jailed" area will need
to be created for each of
the config files that have
the "root", "root dir", or
"root directory" option
specified.

- The data that is to be
accessed will need to
reside within the "jailed"
area because links to data
outside of the "jailed"
area cannot be accessed.
This is true even with the
"follow symlinks" and the
"wide links" set to yes.
These are set to yes
by default.

Hopefully, this information will help anybody else that is trying to create a true Virtual Samba environment.

Brian King