1. Install samba:
sudo apt install samba
2. Adding samba user and password: (must be existing user in Linux)
smbpasswd -a nameOfYourSambaUser
3. Add your shared folder the end of /etc/samba/smb.conf file:
[share name]
path = /yourSharedFolder
writeable = yes
browseable = yes
force user = nameOfYourSambaUser
You need to give permissions for yourSambaUser to access yourSharedFolder:
chown -R nameOfYourSambaUser /path/to/yourSharedFolder
If you want access without password, replace “force user = nameOfYourSambaUser” with: guest ok = yes
4. Restart samba service:
sudo service smbd restart