[Samba] Help Samba Virtual Servers (Host aliases) configuration problem

Schlomo Schapiro samba at schlomo.schapiro.org
Tue May 18 18:47:55 GMT 2004


use the include feature together with the %L parameter, like in 

       %L     the NetBIOS name of the server. This allows you  to
              change  your  config based on what the client calls
              you. Your server can have a "dual personality".

              Note that this  paramater  is  not  available  when
              Samba  listens  on  port  445, as clients no longer
              send this information

So if you use port 445, then it won't work. You can still try to use 
another of the many % variables.

Another way is to define IP aliases and start several smbd each for a 
different IP alias. See the following parameters:

bind interfaces only

(Note that only one should have and you might have to set that 
one as the master and the others as security=server and password 
server= so that the many smbd daemons won't step on their 
respective feet)


On Tue, 18 May 2004, Romeyn Prescott wrote:

> I'm replying to this old message just to say that I am trying to do 
> the same thing and it's not working.  I have done everything as this 
> person has, and no matter which host a Windows box visits, they see 
> the same shares.
> Is it not possible to set up netbios aliases which each present 
> separate shares?
> Thanks,
> ...ROMeyn
> At 4:58 PM +0200 7/8/03, Poletto Davide scribbled:
> >Hi,
> >I need to create one or more NetBIOS host alias of my unique SAMBA server
> >version 2.27 which is running on a RedHat Linux 8.0 box acting as a simple
> >file-sharing machine for our WORKGROUP.
> >I need that my clients see three differents host more than the real
> >fileserver;
> >I think the scope of virtual server was based on which virtual host I'll
> >contact I'll see the relative share: so everyone will see FILESERVER share,
> >everyone who conntacts ALIAS1 will see ALIAS1 share (and FILESERVER share
> >due to include mechanism...) and so on.
> >This is part of my actual "smb.conf" file on /etc/samba directory:
> >
> >[global]
> >
> >workgroup = WORKGROUP
> >netbios name = FILESERVER
> >netbios aliases = ALIAS1 ALIAS2 ALIAS3
> >include = /etc/samba/smb.conf.%L
> >server string = SAMBA %v on %h
> >
> >[SHARE]
> >comment = FILESERVER share
> >path = /home/share
> >printable = no
> >writable = yes
> >valid users = @filesharing
> >write list = @filesharing
> >
> >...then I have edited three separate smb.conf.%L (%L substituted with each
> >alias NetBIOS name) under /etc/samba directory:
> >
> >smb.conf.ALIAS1
> >smb.conf.ALIAS2
> >smb.conf.ALIAS3
> >
> >each of theese configuration files has only a share section (No [global]
> >section) with this style:
> >
> >smb.conf.ALIAS1 has
> >
> >[ALIAS1]
> >comment = ALIAS1 share
> >path = /home/share_alias1
> >printable = no
> >writable = yes
> >valid users = @filesharing
> >write list = @filesharing
> >
> >smb.conf.ALIAS2 has
> >
> >[ALIAS2]
> >comment = ALIAS2 share
> >path = /home/share_alias2
> >printable = no
> >writable = yes
> >valid users = @filesharing
> >write list = @filesharing
> >
> >and so on for ALIAS3.
> >It doesn't work properly because it seems that the variable %L will not
> >"set" as it would by the client connect request.
> >Each client inside my workgroup see effectively three different hosts
> >(virual hosts) ALIAS1, ALIAS2 and ALIAS3 plus the real fileserver FILESERVER
> >but if I'll try to connect with ALIAS1 I'll see only the /home/share of
> >SHARE and not this one plus/and ALIAS1 /home/share_alias1 of ALIAS1!
> >The same if I'll trying to connect to ALIAS2 or ALIAS3...
> >It seems that include mechanism doesn't work properly.
> >Could anyone help me setting up this configuration files properly?
> >
> >Davide Poletto
> >
> >--
> >To unsubscribe from this list go to the following URL and read the
> >instructions:  http://lists.samba.org/mailman/listinfo/samba


More information about the samba mailing list