虚拟机环境 CentOS Linux release 7.6.1810 (Core)
- CentOS系统包管理器安装samba服务
yum -y install samba
- 关闭防火墙
systemctl stop firewalld.service ==> stop
setenforce 0 ==> Permissive
3.创建用户并且创建相关发布目录
groupadd samba
useradd samba -g samba -s /sbin/nologin
smbpasswd -a samba
创建samba发布文件夹
mkdir -p /miao/docs
mkdir -p /miao/share
给docs和share文件夹相应的权限 (chmod 777 docs ; chmod 777 share)
- 修改/etc/samba/smb.conf 配置文件
[global]
workgroup = BIGCLOUD
netbios name = ZZSRV2
server string = Samba Server
security = user
map to guest = Bad User
[SHAREDOCS]
path = /miao/docs/
readonly = yes
browseable = yes
guest ok = yes
[SHARE]
path = /miao/share/
public = no
writable = yes
write list = @samba
validusers = @samba
- 最后启动samba服务
systemctl start smb
网友评论