1、ubuntu 下一个共享需要用户名和密码,一个不需要的smb.conf
[global]
workgroup = work
netbios name = ubuntu server
server string = This is a server
unix charset = utf8
display charset = utf8
dos charset = cp950
log file = /var/log/samba/log.%m
max log size = 50
security = user
map to guest = bad user
usershare allow guests = yes
passdb backend = tdbsam
load printers = no
[home]
comment = home
path = /home
writeable = yes
browseable = yes
write list = @zym
[public]
comment = share
path = /home/public
writeable = yes
browseable = yes
guest ok = yes
2、在centos 下设置vmwaretool的共享没有成功。。于是安装了samba
http://linux.vbird.org/linux_server/0370samba.php
根据鸟哥私房菜来的
/etc/samba/smb.conf
[global]
workgroup = work
netbios name = centosServer
server string = This is a centos server
unix charset = utf8
display charset = utf8
dos charset = cp950
log file = /var/log/samba/log.%m
max log size = 50
security = user
passdb backend = tdbsam
load printers = no
[work]
comment = work dir
path = /home
writeable = yes
browseable = yes
write list = @users
samba 和selinux已经iptables有点冲突。。。有空再研究
用vim打开 /etc/selinux/config
在 SELINUX=enforcing 前面加个#号注释掉它
#SELINUX=enforcing
然后新加一行
SELINUX=disabled
保存,退出,重启系统,搞定
/usr/sbin/setenforce 0 立刻关闭 SELINUX
/usr/sbin/setenforce 1 立刻启用 SELINUX