如果没有用户名和密码身份验证,我无法使用 samba 从 Windows 访问 Linux 文件。它总是要求输入用户名和密码。
有没有一种方法无需任何身份验证(甚至不是第一次)即可访问 Linux 文件,以便任何人都可以访问。
有什么建议吗?
从我的smb.conf
文件中。
我已经把
security = share
guest account = nobody
[home]
comment = Home Directory
# browseable=no here hides homes,but displays a scetion with username;(refer man
browseable = yes
read only = no
create mask = 0777
directory mask = 0777
path = /
guest ok = yes
# valid users = %S
答案1
将访客帐户添加到您的 samba 配置中,如下所述:
https://www.debuntu.org/samba-how-to-share-files-for-your-lan-without-userpassword/
security = share
#...
guest account = nobody
#...
[Guest Share]
comment = Guest access share
path = /path/to/dir/to/share
browseable = yes
read only = yes
guest ok = yes