要求共享一个目录,任何人都可以访问,即不用输入密码即可访问,要求只读
[global]部分 MYGROUP 改为WORKGROUP
security = user 改为 security = share
mkdir /tmp/samba

chmod 777 /tmp/samba
touch /tmp/samba/sharefiles
echo "111111" > /tmp/samba/sharefiles
启动:/etc/init.d/smb start
检查配置的smb.conf是否正确 testparm
末尾处加入:

1. [share]
2. comment = share all
3. path = /tmp/samba
4. browseable = yes
5. public = yes
6. writable = no

测试:win机器浏览器输入 file://192.168.0.22/share
或者运行栏输入: \192.168.0.22