yum install samba
groupadd user216 -g 6000
useradd user216 -u 6000 -g 6000 -s /bin/false -d /dev/null
不建立相應對應系統使用者,新增samba使用者時,會提示
Failed to add entry for user
vim /etc/samba/smb.conf
# 加入以下內容
[share]
comment = share for users
path = /home/backups
browseable = yes
writable = yes
public = no
mkdir /home/backups
chown -R user216:user216 /home/backups
chmod u+rwx,g+rwx,o-rwx /home/backups
smbpasswd -a user216
systemctl stop firewalld
systemctl disable firewalld
或者
firewall-cmd --zone=public --add-port=139/tcp --permanent
firewall-cmd --zone=public --add-port=445/tcp --permanent
systemctl restart firewalld
systemctl start smb
win+r或者在資料夾上輸入部署了samba服務的ip地址
例如:
\\ip\share