Create a network share on Ubuntu using Samba

sudo apt-get update
sudo apt-get install samba

Create a user and a password for samba:

sudo smbpasswd -a <username>

Create a shared directory:

mkdir 'samba_shared_folder'

Backup smb.conf and edit it to include the shared folder:

sudo cp /etc/samba/smb.conf ~

sudo nano /etc/samba/smb.conf ~

Once “smb.conf” has loaded, add this to the very end of the file; there should be¬†nospaces between the lines, and note que also there should be a single space both before and after each of the equal signs.
 path = 'full path to folder'
 valid users = <user_name>
 read only = no

Restart the service:

sudo service smbd restart