我有一个 Windows 域 LAN + 一些 Ubuntu 22.04。我想共享 Ubuntu 文件夹,以便 Windows 域中的每个人都可以访问它。我提出了以下建议:
https://www.debugpoint.com/guide-how-share-folder-between-ubuntu-linux-windows/
之后我在 Windows 中查看共享文件夹
\\myubuntu
\media
但我无法在 Windows 中打开它,它告诉我:您没有权限访问 \myubuntu\media
如何与任何 Windows 用户共享?PS smb.config 包含
workgroup = WORKGROUP # <-- maybe need to change it?
我添加了以下字符串:
[media]
path = /home/xoleg/media
browsable = yes
writable = yes
read only = no
force user = guest # <-- maybe need to change it?
guest ok = yes
答案1
[media] path = /home/xoleg/media browsable = yes writable = yes read only = no force user = guest # <-- maybe need to change it? guest ok = yes
xoleg 是这个 Linux 系统上的用户名吗?
如果是,并且您正在运行 ubuntu 22.04,则任何本地用户或网络都将无法访问该用户主目录中的任何内容。
如果你确实想要一个访客可访问的共享,你需要更改force user = guest
为force user = xoleg
然后重新启动smbd:
sudo service smbd restart