使用apt安装samba

1
apt install samba -y

部署samba

1
2
3
4
5
6
7
8
9
10
11
echo '[share]
comment = share
path = /root
public = yes
writable = yes
directory mask = 0775
create mask = 0775
valid users = root
write list = root
browseable = yes
available = yes' > /etc/samba/smb.conf

重启samba

1
systemctl restart smbd