Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.