I'm running an OpenSuSE 11.3 box with samba v3.5.4. I've set up my smb.conf
as follows:
[global]
netbios aliases = jean-pc2 storage
include = /etc/samba/smb.conf.%L
Then I have two other config files, smb.conf.jean-pc2
and smb.conf.storage
smb.conf.jean-pc
[global]
workgroup = WORKGROUP
security = SHARE
guest account = smbguest
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
[production]
path = /data/shared/jean-pc
browseable = yes
read only = no
guest ok = yes
[remmert]
path = /data/shared/jean-pc/remmert
browseable = yes
read only = no
guest ok = yes
smb.conf.storage
[global]
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
security = share
guest account = smbguest
workgroup = WORKGROUP
[Data]
path = /data/shared
browseable = yes
read only = no
guest ok = yes
[websites]
comment = Apache published directory
path = /srv/www/htdocs
read only = No
browseable = yes
guest ok = yes
The problem I'm having is that only the storage
file is being used. Both aliases appear in the computers list in windows, but when I open jean-pc
, it has the data
and websites
shares, instead of the expected production
and remmert
shares.
Regardless of the order in which I list the aliases, only the shares from the storage
configuration are being used.
Why is Samba behaving like this?
Best Answer
This happens because when samba listens on port 445 (the new default) it does not get NetBIOS information from the client.
Setting it to listen on port 139 only (using
smb ports = 139
) causes it to fallback to the older protocol in which the NetBIOS information is transmitted, which makes it work as expected.