[Samba] Multiple Samba Instances: Cannot set private dir and lock directory in smb.conf

Christian Brandes christian.brandes at forschungsgruppe.de
Wed Jun 11 13:26:01 GMT 2008


Hi,

four years ago someone has tried to run two independent instances of 
samba on one machine:
http://lists.samba.org/archive/samba/2004-August/091500.html

I would like to do that, too.
Are there still hardcoded file locations, that cannot be overwritten in 
smb.conf?

My samba version: 3.0.28a

These parameters in my /var/samba/etc/smb_SMBTEST1.conf do not help:

    log file = /var/log/samba/SMBTEST1/log.%m

    pid directory = /var/run/samba/SMBTEST1
    lock directory = /var/run/samba/SMBTEST1
    private dir = /var/run/samba/SMBTEST1

It is possible to run more than one instance. I did not find out any 
interference, yet. But they still access the same files in the standard 
encoded path:

ps faxl

F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
5     0 25288     1  20   0  54968  1156 -      Ss   ?          0:00 
/usr/sbin/nmbd -D -s /var/samba/etc/smb_SMBTEST1.conf
5     0 25290     1  20   0  77604  3004 -      Ss   ?          0:00 
/usr/sbin/smbd -D -s /var/samba/etc/smb_SMBTEST1.conf
1     0 25294 25290  20   0  77604  1420 pause  S    ?          0:00  \_ 
/usr/sbin/smbd -D -s /var/samba/etc/smb_SMBTEST1.conf

ls -la /proc/25288/fd
total 0
dr-x------ 2 root root  0 2008-06-11 13:49 .
dr-xr-xr-x 6 root root  0 2008-06-11 13:49 ..
lrwx------ 1 root root 64 2008-06-11 13:49 0 -> /dev/null
lrwx------ 1 root root 64 2008-06-11 13:49 1 -> /dev/null
l-wx------ 1 root root 64 2008-06-11 13:49 2 -> 
/var/log/samba/SMBTEST1/log.nmbd
l-wx------ 1 root root 64 2008-06-11 13:49 4 -> 
/var/run/samba/SMBTEST1/nmbd-smb_SMBTEST1.conf.pid
lrwx------ 1 root root 64 2008-06-11 13:49 5 -> /var/run/samba/messages.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 6 -> socket:[49952]
lrwx------ 1 root root 64 2008-06-11 13:49 7 -> socket:[49953]
l-wx------ 1 root root 64 2008-06-11 14:48 8 -> 
/var/log/samba/SMBTEST1/log.nmbd

ls -la /proc/25290/fd
total 0
dr-x------ 2 root root  0 2008-06-11 13:49 .
dr-xr-xr-x 6 root root  0 2008-06-11 13:49 ..
lrwx------ 1 root root 64 2008-06-11 13:49 0 -> /dev/null
lrwx------ 1 root root 64 2008-06-11 13:49 1 -> /dev/null
lrwx------ 1 root root 64 2008-06-11 13:49 10 -> 
/var/run/samba/connections.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 11 -> /var/run/samba/brlock.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 12 -> /var/run/samba/locking.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 13 -> /var/run/samba/gencache.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 14 -> 
/var/lib/samba/ntdrivers.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 15 -> 
/var/cache/samba/login_cache.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 16 -> 
/var/lib/samba/account_policy.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 17 -> 
/var/lib/samba/ntprinters.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 18 -> /var/lib/samba/ntforms.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 19 -> socket:[49976]
l-wx------ 1 root root 64 2008-06-11 13:49 2 -> 
/var/log/samba/SMBTEST1/log.smbd
lr-x------ 1 root root 64 2008-06-11 13:49 20 -> pipe:[49984]
l-wx------ 1 root root 64 2008-06-11 13:49 21 -> pipe:[49984]
lr-x------ 1 root root 64 2008-06-11 13:49 3 -> /dev/urandom
lrwx------ 1 root root 64 2008-06-11 13:49 4 -> /var/lib/samba/secrets.tdb
l-wx------ 1 root root 64 2008-06-11 13:49 5 -> 
/var/log/samba/SMBTEST1/log.smbd
l-wx------ 1 root root 64 2008-06-11 13:49 6 -> 
/var/run/samba/SMBTEST1/smbd-smb_SMBTEST1.conf.pid
lrwx------ 1 root root 64 2008-06-11 13:49 7 -> /var/run/samba/messages.tdb
lrwx------ 1 root root 64 2008-06-11 13:49 8 -> socket:[49961]
lrwx------ 1 root root 64 2008-06-11 13:49 9 -> /var/run/samba/sessionid.tdb

As well as samba first logs into /var/log/samba/log.nmbd and then 
continues with /var/log/samba/SMBTEST1/log.nmbd.

I would not like to compile samba new, as I do not like separate 
binaries for each instance.

Ideas wellcome.

Thanks
Christian


More information about the samba mailing list