Windows XP 和 SAMBA

Windows XP 和 SAMBA

我们有一台 CentOS 5.5 服务器,运行内核 2.6.18-194.32.1.el5 和 SAMBA 版本 3.0.33-3.29.el5_6.2。我们创建了一个隐藏共享,用于映射网络驱动器。这在我们的 Windows XP SP3 机器上运行良好,然后突然停止工作。我检查了很多东西,不知道如何进一步排除此问题。下面列出了来自各种配置的片段。

/etc/samba/smb.conf

[global]
client lanman auth = yes
client ntlmv2 auth = yes
dns proxy = no
encrypt passwords = yes
hosts allow = 10.130.155. 127.0.0.1
hosts deny = all
lanman auth = no
load printers = no
log level = 1
max connections = 30
netbios name = SAMBA
ntlm auth = yes
null passwords = no
printcap name = /etc/printcap
printing =
security = user
server string = SAMBA Server
smb ports = 445
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536 SO_KEEPALIVE
workgroup = Workgroup

#============ Share Definitions =======================#
[share$]
comment = Share
create mask = 0775
directory mask = 0775
force group = staff
path= /vcroot
valid users = @staff
writable = yes

SAMBA 的 iptables 规则

#!/bin/sh

IPT="/sbin/iptables"

$IPT -A INPUT -s 10.130.155.0/24 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
$IPT -A INPUT -s 10.130.155.0/24 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
$IPT -A INPUT -s 10.130.155.0/24 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
$IPT -A INPUT -s 10.130.155.0/24 -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
$IPT -A INPUT -s 10.130.155.0/24 -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT

/var/log/samba/smdb.log 文件的输出显示以下内容:

[2011/05/24 16:40:04, 0] lib/util_sock.c:read_data(540) read_data: read failure for 4 bytes to client 10.130.155.169. Error = Connection reset by peer
[2011/05/24 16:40:04, 0] lib/util_sock.c:read_data(540) read_data: read failure for 4 bytes to client 10.130.155.169. Error = Connection reset by peer
[2011/05/24 16:40:04, 0] lib/util_sock.c:read_data(540) read_data: read failure for 4 bytes to client 10.130.155.169. Error = Connection reset by peer
[2011/05/24 16:40:04, 1] smbd/service.c:make_connection_snum(1077) machineA (10.130.155.169) connect to service share$ initially as user userA (uid=xxx, gid=xxx) (pid 646)
[2011/05/24 16:40:04, 0] lib/util_sock.c:read_data(540) read_data: read failure for 4 bytes to client 10.130.155.169. Error = Connection reset by peer
[2011/05/24 16:40:04, 1] smbd/service.c:close_cnum(1274) machineA (10.130.155.169) closed connection to service share$

我尝试调整 smb.conf 文件中的“smb 端口”设置,但似乎没有什么效果。我还尝试调整客户端的“网络安全:LAN Manager 身份验证级别 - 发送 LM 和 NTLM 响应”设置,但似乎也没有什么效果。

如您能提供任何帮助,我们将不胜感激。

答案1

盲目猜测:您的 Samba 服务器位于工作组组中。您的 XP 客户端位于 AD 域中。这可能会导致问题。当客户端尝试访问共享时,Samba 日志中是否有一些条目?它是否曾经联系过服务器?客户端和服务器之间的协商在哪个阶段中断?

相关内容