[KLUG Members] Two samba shares

Adam Williams members@kalamazoolinux.org
13 Dec 2001 12:25:23 -0500


>Earlier, Adam mentioned something about running a virtual host--so I could
>have a second Samba server running to allow password controlled access to a
>single share. What documentation is out there on this (or what is the proper
>name of virtual hosting so I can look it up)?

Simple.

Create a virtual interface "ifconfig eth0:1 z.y.z.a netmask b.c.d.e"

You have to do this because winblows will ONLY see SMB services on ports
137/139,  so you can only run one daemon per interface.

Create a samba config file with the "bind interfaces only" pointing to
the virtual interface.

Mod your "original" interface to bind to the "real" interface AND
LOOPBACK.

Restart your "original" daemon

Start a copy of samba using the "virtual" config, via the -s {filename}
directive when you start the daemons.

It is also a good idea to point them at seperate log files, etc...

They MUST have diffrent names.

Only the samba daemon bound to loopback can act as a PDC or password
server as to perform these tasks Samba needs to be able to talk to
itself.

Depending upon your network you may need to add the virtual IP to DNS, 
probably a good idea even if you don't *need* to.