//备份配置文件
cd /etc/samba
cp smb.conf smb.conf.orgin
//修改smb.conf
vim /etc/samba/smb.conf
[global]
//创建Samba用户,必须是已经存在的用户
pdbedit –a username
//关闭SELINUX
vim /etc/selinux/config
SELINUX=permissive
//配置防火墙
firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload
//重启Samba
systemctl restart smb
systemctl enable smb
//重启系统
reboot
cd /etc/samba
cp smb.conf smb.conf.orgin
//修改smb.conf
vim /etc/samba/smb.conf
[global]
workgroup = WORKGROUP[homes]
server string = Samba Server
security = user
passdb backend = tdbsam
comment = Home Directories
browseable = no
writable = yes
valid users = %S
; valid users = MYDOMAIN\%S
//创建Samba用户,必须是已经存在的用户
pdbedit –a username
//关闭SELINUX
vim /etc/selinux/config
SELINUX=permissive
//配置防火墙
firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload
//重启Samba
systemctl restart smb
systemctl enable smb
//重启系统
reboot