運行yum install -y samba
安裝samba.linux
groupadd smbshare
useradd -g smbshare share
passwd sharevim
smbpasswd -a sharemarkdown
mkdir /home/smbshare
chgrp -R smbshare /home/smbshare
chmod g+w smbshare/spa
cp /etc/samba/smb.conf /etc/samba/smb.confbakrest
vim /etc/samba/smb.confcode
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
[global]
workgroup = SAMBA
security = user
map to guest = Bad User
log file = /var/log/samba/log.%m
[shares]
comment = share
path = /home/smbshare
# 表示用戶組
valid users = @smbshare
read only = No
複製代碼
systemctl restart smborm
訪問\\192.168.1.202\shares地址string
使用share/share用戶名/密碼登陸it