vi /etc/samba/smb.conf
#没有加密的配置
[global]
workgroup = MSHOME
server string = Samba Server Version %v
log file = /var/log/samba/log.%m
max log size = 50
security = share
load printers = no
[temp]
path = /home/samba
read only = no
browseable = yes
guest ok = yes
#有加密的配置
[global] workgroup = MSHOME server string = Samba Server Version %v log file = /var/log/samba/log.%m max log size = 50 security = user
passdb backend = tdbsam
load printers = no[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0666
directory mode = 0777
[project]
comment = root
path = /home/samba
writable = yes
write list = @root #表明root组的用户可写
useradd samba
pdbedit -a -u samba
pdbedit -a -u root #这样可以用root在windows下登录了,登录目录是/home/samba,登录者当然就是root权限了。这样可以防止在虚拟机下用root去编译生成一些文件普通用户不可读或不可写的情况。
#启动
service smb start
service nmb start
chkconfig smb on
chkconfig nmb on
service iptables stop
chkconfig iptables off
setsebool -P samba_enable_home_dirs=1
setsebool -P samba_export_all_rw=1
阅读(1582) | 评论(0) | 转发(1) |