samba 选项都在 /etc/samba/smb.conf 里设定. 实现匿名共享的意思是不需要用户名和密码就能直接访问.
在 global 部分设定 security 选项为 share 时, 设置最简单,
1 编辑smb.conf , 设定 global 部分
security = share
2将要共享的目录设定系统权限
chmod 755 /opt/smb/nobody
3编辑smb.conf , 将要共享的目录设定系统 samba 选项
path = /opt/smb/nobody
guest ok = Yes
在 global 部分设定 security 选项不是 share 时, 就要更多选项来配合了
1 编辑smb.conf , 设定 global 部分
security =user
注意加入下面的选项
map to guest = bad user
2将要共享的目录设定系统权限
chmod 755 /opt/smb/nobody
3编辑smb.conf , 将要共享的目录设定系统 samba 选项
path = /opt/smb/nobody
guest ok = Yes
guest only = yes