无法与Samba共享文件

在我的本地局域网中,试图将文件夹从我的Linux服务器共享到Windows PC。

Samba守护进程正在监听:

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 2707/smbd tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2707/smbd 

桑巴看起来很好configuration:

 [root@localhost samba]# testparm Load smb config files from /etc/samba/smb.conf rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) Processing section "[Downloads]" Processing section "[homes]" Processing section "[printers]" Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions [global] server string = My Lil Linux Box smb passwd file = /etc/samba/smbpasswd log file = /var/log/samba/%m.log socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 idmap config * : backend = tdb hosts allow = 192.168., 127. [Downloads] comment = Downloads path = /home/samba read only = No guest ok = Yes [homes] comment = My Home Directory read only = No guest ok = Yes [printers] path = /var/spool/samba read only = No guest ok = Yes printable = Yes print ok = Yes browseable = No 

防火墙为Samba和Samba客户端添加了exception。 也暂时禁用SELinux。

不过Windows PC不能发现这个服务器,但是服务器却响应了ping。

任何想法,为什么我不能到达Linux服务器?

如果\\<ip>工作,并为您足够,一切都很好。 但是,您的问题是networking浏览无法正常工作。 最简单的方法是使服务器和客户端都在同一个SMB工作组中。

在Windows中,您可以在“控制面板” – >“系统” – >“系统名称”或其他位置(不能立即检查)中设置工作组。 确保它具有相同的值,在所有的机器和你的smb.conf[global]部分你有一个参数

  workgroup = <workgroupname> 

这显然应该是在Windows机器上相同。