yum install samba
yum info samba
systemctl enable --now smb
systemctl status smb
firewall-cmd --add-service=samba --permanent
firewall-cmd --reload
firewall-cmd --list-all
useradd -c samba -M -s /sbin/nologin samba
smbpasswd -a samba
pdbedit -L
mkdir /samba
#chmod 777 /samba
chown samba:samba /samba
chcon -t samba_share_t /samba
ls -ldZ /samba
vim /etc/samba/smb.conf
=========================
[global]
workgroup = WORKGROUP
security = user
passdb backend = tdbsam
[samba]
path = /samba
browseable = Yes
read only = No
inherit acls = Yes
=========================
testparm -v
systemctl restart smb
#firewall-cmd --state
#getenforce
#setenforce 0 / 1
=========================
rem 删除samba记录,重启explorer
echo.
@echo off
echo 1、显示网络连接记录,执行 net use
echo.
net use
echo.
echo 2、删除网络链接记录,执行 net use * /del
echo.
net use * /del
echo.
echo 3、结束explorer.exe进程
pause
taskkill /F /IM explorer.exe
echo 4、重启explorer.exe进程
pause
start explorer.exe
=========================