我正在运行带有 samba v3.5.4 的 OpenSuSE 11.3 机器。我的设置smb.conf
如下:
[global]
netbios aliases = jean-pc2 storage
include = /etc/samba/smb.conf.%L
然后我还有两个配置文件smb.conf.jean-pc2
,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
我遇到的问题是只有storage
文件正在使用。两个别名都出现在 Windows 的计算机列表中,但当我打开时jean-pc
,它有data
和websites
共享,而不是预期的production
和remmert
共享。
无论我列出别名的顺序如何,都只storage
使用配置中的共享。
Samba 为何表现如此?
答案1
发生这种情况的原因是,当 samba 监听端口 445(新的默认端口)时,它不会从客户端获取 NetBIOS 信息。
将其设置为仅监听端口 139(使用smb ports = 139
)会导致它回退到传输 NetBIOS 信息的旧协议,从而使其按预期工作。