To share directories and files between this Linux server and other devices.
sudo apt install samba
Edit the Samba configuration file, /etc/samba/smb.conf, and add the following section at the end of the file to define the media share:
[Media] path = /mnt/media browseable = yes read only = no guest ok = no valid users = peter
NOTE: The config is:
testparm
Add the user on the server user as a Samba user:
sudo smbpasswd -a peter
NOTE: Follow the prompts to create a password for the Samba user.
Samba does not use the system account password, which is why it needs its own password.
Restart the Samba service to apply the changes:
sudo systemctl restart smbd
NOTE: Remember to update any firewall rules to allow Samba traffic
sudo systemctl status smbd