apt-get update apt install samba ufw allow 'Samba'
vim /etc/samba/smb.conf [public] comment = no need username and password path = /samba/public browsable = yes guest ok = yes writable = yes read only = no mkdir -p /samba/public chmod -R 777 /samba/public systemctl restart smbd.service nmbd.service
[Private] comment = needs username and password to access path = /samba/private/ browseable = yes guest ok = no writable = yes valid users = @samba
useradd net1 sudo smbpasswd -a username sudo groupadd samba sudo gpasswd -a username samba
mkdir -p /samba/private chmod -R 777 /samba/private systemctl restart smbd.service nmbd.service