1.关闭SELinux
vi /etc/selinux/config
将SELINUX=enforcing 改为SELINUX=disabled(需重启机器)
2.安装samba
yum install samba samba-client
3.配置共享访问
编辑 /etc/samba/smb.conf
在[global]中添加:
security = user
map to guest = Bad User
#允许guest用户
guest account = administrator
#guest映射为系统某一账户
4.配置共享文件夹
[RDP]
comment = RDP_Defect
path = /home/administrator/RDP_Defect
valid users = administrator
writable = yes
available = yes
public = yes
case sensitive = auto
preserve case = Yes
short preserve case = Yes#设置可以修改的账户(global中的账户),并设置大小写不敏感
5.设置启动
启动 systemctl start smb
开机启动 systemctl enable smb