yum -y install samba 

systemctl restart smb

groupadd –g 888 admin
useradd -d /home/admin -g admin admin

pdbedit -a admin
admin
admin

cp /etc/samba/smb.conf /etc/samba/smb.conf.bak

vim /etc/samba/smb.conf

添加:

[tools]
path = /home/share
writeable = yes
comment = 666
valid users = admin
mkdir -p /home/share
chmod 777 /home/share

/usr/sbin/setsebool -P samba_export_all_rw on
systemctl restart smb
systemctl enable smb