系统环境: CentOS7.6
关闭: selinux、firewalld
一、下载: samba服务套件
[root@testVM ~]# yum install -y samba*
二、 启动samba服务
[root@testVM ~]# systemctl start smb
[root@testVM ~]# systemctl enable smb
三、 创建共享的目录和用户
1、创建对外共享的目录
[root@testVM samba]# mkdir -p /home/FileServer
2、创建允许访问的用户名: (py)和密码: (123456)
[root@testVM samba]# useradd py
[root@testVM samba]# smbpasswd -a py
3、查看samba服务数据库里有没有该用户名: (py)
4、修饰配置文件
[root@testVM ~]# vim /etc/samba/smb.conf
…系统自带的内容
…系统自动的内容
…在下边追加这些内容
[FileServer]
FileServer = ziliao
path = /home/FileServer
allow hosts = 10.168.1.0/24
user = py
writable = yes