This article is suitable not only for Ubuntu but also for all Debian-based systems, including Raspbian, which is often installed on Raspberry PI.

The article will describe the most minimal configuration that will suit many users who do not need security but simply want to share a folder on their computer.

In subsequent articles, there will be a more serious configuration, but here is the bare minimum.

Installing Samba on Ubuntu is quite simple and comes down to one command.

sudo apt install samba samba-common python-dnspython

After installation, it is better to create a backup of the original configuration file samba.

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig

After that, we can start the configuration. Open /etc/samba/smb.conf, delete everything that is there, and instead insert the following content:

[global]
workgroup = WORKGROUP
security = user
map to guest = bad user
min protocol = NT1
workgroup = WORKGROUP

[dir_name]
path = /path
guest ok = Yes
writable = Yes
 Don't forget to change WORKGROUP, dir_name, and path to your names and paths.

 

At the end

service smbd restart