[Samba] 2 domains on 1 samba server

John H Terpstra jht at samba.org
Mon Mar 22 14:25:17 GMT 2004


On Mon, 22 Mar 2004, Craig White wrote:

> On Mon, 2004-03-22 at 02:41, Isabelle Heu wrote:
> > Hi,
> > I'd like my samba server to control 2 domains.
> > I've read there was 2 possibilities :
> > 	- using netbios name/alias & include files
> > 	- running 2 smbd
> >
> > the 1st way :
> > my smb.conf goes like
> > 	 netbios name = istpc91
> >         netbios aliases = winserv
> > 	include = /etc/smb.conf.%L
> >
> > and my smb.conf.istpc91
> > 	workgroup = IST
> >
> > 	smb.conf.winserv
> > 	workgroup =TESTIST
> >
> > with this solution i 2 servers istpc91 and winserv working for the same
> > workgroup "WORKGROUP".
> >
> >
> > the 2nd way:
> > i run smbd and nmbd with the 2 different configuration files
> >
> > /usr/sbin/smbd -D -s /etc/samba/smb.conf.istpc91
> > /usr/sbin/nmbd -D -s /etc/samba/smb.conf.istpc91
> >  /usr/sbin/smbd -D -s /etc/samba/smb.conf.winserv
> >  /usr/sbin/nmbd -D -s /etc/samba/smb.conf.winserv
> >
> > then it seems that only the first command line is taken.
> >
> > So, have anyone succeed to do this?
> ----
> I would want to have 2 network cards and bind the smbd/nmbd pair to one
> of the cards. Still don't know if this would work, simply guessing.

You can do this with IP Aliases. Each server (smbd) must be bound to just
one IP alias.

To create an IP Alias on Linux:

	ifconfig eth0:0 192.168.1.3

To bind smbd to an IP Alias:

	interfaces = eth0:0
	bind interfaces only = yes

Cheers,
John T.
-- 
John H Terpstra
Email: jht at samba.org


More information about the samba mailing list