[Samba] Multiple samba servers with AD integration

Rowland Penny rowlandpenny at googlemail.com
Tue Dec 2 07:55:55 MST 2014


On 02/12/14 14:47, Sketch wrote:
> On Tue, 2 Dec 2014, Rowland Penny wrote:
>
>> I think I understand what you are trying to do, you have an initial 
>> smb.conf which calls 2 other nearly identical smb.conf's and you want 
>> to run three different samba servers on the same machine.  I don't 
>> think this is going to work, I am fairly sure you can only run once 
>> instance of samba on a machine. What you can do, is run one smb.conf 
>> that can include another conf file, this extra conf file usually 
>> contains shares.
>
> I don't really see why one would want to run separate samba servers 
> using the same authentication source (DC) on the same machine either.  
> However, I do think it should be possible.
>
>> If you want to run multiple samba instances on one machine, then I 
>> suggest you investigate VM's, one instance of samba per VM.
>
> I see there being two issues with running multiple samba servers on 
> the same machine, and I think both are possible to fix.  You're going 
> to need to run the servers on different IP addresseses.  You can bind 
> to particular IP with the "interfaces = 1.1.1.1" option in the global 
> section of your smb.conf.
>
> The other problem is you're going to have multiple copies of samba 
> trying to use the same tdb files.  This is probably going to cause 
> severe breakage unless you run each copy with separate state dirs.  I 
> don't know exactly what is needed, but looking at the smbd command 
> line options, I would guess each running copy would need it's own 
> --statedir --cachedir --piddir and --privatedir set.
>
>> Also I suggest that you remove the 'socket options' line, you are 
>> probably making things worse by having this.
>
> Seconded.  First rule of optimization: don't do it unless you 
> understand what your changes are supposed to do, and can test and 
> verify the results. Most of the advice on the internet regarding samba 
> socket options is old and out of date and will hurt more than it helps 
> in most cases.

I have never heard of anybody doing this, but there seems to be a wiki 
page for this:

https://wiki.samba.org/index.php/Multiple_Server_Instances

I still don't think that it is going to work the way the OP is trying 
and I still think that going with VM's would be the best way.

Rowland



More information about the samba mailing list