- Learn Linux
- Learn Electronics
- Raspberry Pi
- LPI certification
- News & Reviews
This provides basic details of how to configure a Raspberry Pi as a samba server. This will allow Windows (and other Operating Systems) to access data on the Raspberry Pi across a network similar to how this is available using a Windows computer.
This is useful for making files available on your local network so that you can watch / listen to them using Kodi, or with the correct settings as a way of sharing files with colleagues.
This assumes you have already installed the Raspberry Pi using a recent Raspbian distribution.
Install the samba software using
sudo apt install samba
As root edit the file /etc/samba/smb.conf
Set workgroup to the name of your local workgroup (this can be left at the default WORKGROUP if you don't already have a workgroup). If you would like to use the Raspberry Pi as a server for the windows name service then you can change the wins support entry to yes and remove the '#' which indicates that line is a comment.
Now go to the bottom of the file and add any required shares
The following example shows an example for a file share that could be useful for sharing media files for a Kodi client on your local network.
comment = File Share
writeable = no
guest ok = yes
path = /data
Start the service with the command
sudo service smbd start
This provides a guest readable (none writeable) file share, which can be accessed on Linux as:
Or on a windows system as:
For more details of Samba configuration options see the Samba website.