centos7 安装 samba

参考 https://www.howtoforge.com/samba-server-installation-and-configuration-on-centos-7


在 var/www 为例说明

1  建立用户组与用户并初始密码
goupadd www  
useradd -g www www
smbpasswd www
passwd www


2  建立目录并赋予权限
mkdir -p /var/www 
chown -R  www:www /var/www 


3 编辑 /etc/samba/smb.conf 内容如下
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos
map to guest = bad user
dns proxy = no
#============================ Share Definitions ==============================
[www]
path = /var/www
valid users = @www
writable = yes
browsable = yes


4 测试smb的参数 
testparm


5 设置selinux权限
setsebool -P  samba_export_all_rw on






猜你喜欢

转载自blog.csdn.net/zhaozhencn/article/details/51868177
今日推荐