Samba

Samba provides file and print services on Linux for Windows computers.

To install Samba:

sudo apt update
sudo apt install samba

The configuration file for Samba is located at /etc/samba/smb.conf, edit samba configuration:

nano /etc/samba/smb.conf    

Share example:

[share.name]
guest ok = yes
path = local.shared.dir
available = yes
read only = no
browseable = yes
public = yes
writable = yes
create mask = 0777

Password protected share example:

[share.name]
path = local.shared.dir
available = yes
read only = no
browseable = yes
public = yes
valid users = user.name
writable = yes
create mask = 0777
force create mode = 0777
force directory mode = 0777
force user = user.name
force group = user.group
passdb backend = tdbsam

System user’s password must be added to Samba:

smbpasswd -a user.name

For changes to take effect, you must restart samba:

systemctl restart smbd    

(stopstart)

Leave a Comment

Tested on Ubuntu & Pop OS