You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

两台Ubuntu 22.04主机无法通过Samba互访问题求助

两台Ubuntu 22.04主机无法通过Samba互访问题求助

大家好,我遇到了一个Samba跨主机互访的问题,折腾了好几种方法都没解决,想请各位帮忙排查下:

环境说明

  • 两台主机都是Ubuntu 22.04.2 LTS x86_64,全程没有Windows机器参与
  • 两台都运行着Samba服务,版本为:smbd version 4.15.13-Ubuntu
  • 为了排除安全限制干扰,我已经关闭了网络上所有安全策略,允许所有流量通行

问题现象

不管在哪台机器上打开文件管理器,进入「其他位置」的网络板块,都能看到本地和另一台主机的Samba服务。访问本地的Samba共享完全没问题,但尝试连接另一台主机的共享时,总会弹出错误提示:

"Unable to access location"
"Failed to retrieve share list from server: Connection timed out"

我试过冷启动两台机器、修改工作组名称等方法,但都没用,始终只能访问本地共享,远程连接一直超时。

我的Samba配置文件

smb.conf内容:

[global]
server string = SYSTEM-1
workgroup = INVESTIGATIONS
security = user
map to guest = Bad User
name resolve order = bcast host
include = /etc/samba/shares.conf

shares.conf内容:

[Uploads]
path = /share/Uploads
force user = smbuser
force group = smbgroup
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
public = yes
writeable = yes

[Downloads]
path = /share/Downloads
force user = smbuser
force group = smbgroup
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
public = yes
writeable = no

备注:内容来源于stack exchange,提问作者Ted Montana

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 12:04:12