Hi ! Is it possible for one samba server to manage several domain ( seral instance) ? I want to connecte tow diffent network to my server ( with tow interface ) and get one different domain for each network manage par the same server. Thanks ! Y.
Cl?ment VERET wrote:> 2009/9/2 azzouz <azzouz at hymedia.univ-paris8.fr>: > >> Hi ! >> >> Is it possible for one samba server to manage several domain ( seral >> instance) ? >> > > Just run multiple smbd process with different config file and log dir : > smbd -s=$CONFIG_FILE -l=$LOG_PATH -D > > You need to specify a different interface for each samba server as > well. Then, all you have to do is copying the original /etc/init.d/smb > file and modify the parameters for your second domain. >Great! Thanks! Are there some who test this sort of configuration ? Don't this cause problems of load and availability ? Y.
Michael Wood wrote:> 2009/9/3 azzouz <azzouz at hymedia.univ-paris8.fr>: > [...] > >> There is a probleme ! >> >> in the /etc/init.d/smb file there is a test: >> >> # See if the daemons are there >> test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd || exit 0 >> > > This means: > Test to see if /usr/sbin/nmbd is executable and /usr/sbin/smbd is > executable. If not, then exit 0. > i.e. it just tests to see if the nmbd and smbd daemons are both executable. > This line does not actually run nmbd or smbd. > > >> have i to comment this line. If so it could cause conflict. can't it ? >> > > No, leave that as it was. > > >> i write instead : >> >> test -x `/usr/sbin/nmbd -D -s $CONFIG_FILE` -a -x `/usr/sbin/smbd -D -s >> $CONFIG_FILE` || exit 0 >> > > This will run nmbd and will probably complain about "test: too many > arguments" (same for smbd) because you're supposed to call "test -x" > with a filename, and not with the string "smbd version ... Copyright >in fact it work fine. No complain from smbd> Andrew Tridgell..." etc. > > >> in summary: >> >> i create tow file in /etc/init.d: samb.domain1 and samba.domain2 >> > > OK > > >> when il execute the first one i get tow smbd instance a one of nmbd (i don't >> use yet wins). It 's normal. >> But when execute the second one i get only one instance of nmbd. And vise >> versa. >> >> I think that the amount og instance of smbd is limited. Where could >> configure the amount of instance >> > > I don't know about this. Did you specify in each config file that > each smbd must listen on its own interface only? > >Yes. And what resolve is that specify also the option "bind interfaces only = yes" and now it work very well.>> An other question : i use ldap for the account. What about you ? >> could i configure tow domain in ldap with different SID ? >> > > I have not yet used LDAP with Samba. > >thanks to you Y.
Sorry, I forgot to include the list in my reply. 2009/9/4 Michael Wood <esiotrot at gmail.com>:> 2009/9/4 azzouz <azzouz at hymedia.univ-paris8.fr>: > [...] >> otherwise the script don't work as i expected. i have tow different script : >> one execute 1 instance for the domainn Domain1 and an other one for the >> domain ?domain1. The tow script refer to tow different smb.conf file. >> >> 1 - When i execute the first one first: it 's OK >> ? But when i execute the second one after: nothing! the process are not >> executed. >> >> 2 - When i execute the second one first: it's ok >> ? But when i execute the first one after: nothing! the process are not >> executed >> ?it's like i could only execute only one instance ! >> >> how to get around ? > > Unfortunately I can't test this at the moment. ?Maybe you should try > starting up smbd and nmbd from the command line first without using > the scripts. ?When that's working it should be possible to make the > necessary changes to the scripts. > > Try increasing the debugging when you start smbd and nmbd and checking > the logs to see if there are error messages. > > Maybe you will not need two instances of nmbd, but maybe someone else > can comment.-- Michael Wood <esiotrot at gmail.com>