The task is to setup Samba shared folder on Linux Debian computer to share files with the LAN computer Raspberry Pi with Kodi (has Samba client)

On the server (Linux Debian computer in my case, other distributions will work too likely):

sudo apt install samba && sudo systemctl status nmbd && echo "It should be running"

Creating share:

sudo mkdir /samba && sudo chown -R $(whoami):$(whoami) /samba && sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_original

echo -e "[samba]\ncomment = Samba on Debian\npath = /samba\nread only = no\nbrowsable = yes"|sudo tee -a /etc/samba/smb.conf

add Linux user (hit enter on all prompts):

sudo adduser samba

set samba password (seems like Kodi unable to work if empty):

sudo smbpasswd -a samba && sudo systemctl restart smbd.service

status on server:

smbclient -L localhost
Code:
        Sharename       Type      Comment 
        ---------       ----      ------- 
        print$          Disk      Printer Drivers 
        samba-share     Disk      Samba on Debian
Current configuration (/etc/samba/smb.conf) summary:

testparm

if you have set your Linux iptables firewall policy as DENY, you may need to add new ACCEPT rule for Samba ports (you may want to bother with this only if unable to connect):

sudo iptables -I INPUT -s 192.168.0.0/16 -m state --state NEW -p tcp --dport 445 -j ACCEPT
or
sudo iptables -I INPUT -s 192.168.0.0/16 -p tcp -m state --state NEW -m multiport --dports 137,138,139,445 -j ACCEPT
(removal is done by replacing -I by -D)

On the client: Add Samba share inside Kodi (media center software):

Files / Videos / Add / Browse / Add network location / type: Samba(SMB); your Samba server LAN IP like for example "192.168.0.5"; directory "samba", samba username and password.
Images: https://kodi.wiki/view/SMB#Add_Network_Location
To remove the entry, right click mouse on it.

To connect created Samba share from different Linux LAN computer:

sudo apt install smbclient && sudo smbclient //192.168.x.x/samba -U samba

Issues:

Samba client does not play video that is a symbolic link linking outside of the shared folder (/samba). For home use possibly acceptable to allow insecure wide links: https://unix.stackexchange.com/questions/5120/how-do-you-make-samba-follow-symlink-outside-the-shared-path/137192#137192

I have noticed hours long making of "ceph-libs" package which was said to be not necessary for samba so i have removed it. Consider the same. sudo apt remove ceph-libs