Skip to main content
LPI Linux EssentialsRaspberry PiSAMBA

Understanding a Simple Samba Server on the Raspberry Pi

LinuxEssentialsBorderSMALLIn this video we look at a simple Samba Server on the Raspberry Pi for the LPI Linux Essentials exam. This is all about understanding major open source applications and SAMBA; Windows File and Print Sharing is certainly that. You will see that is is easy to create file shares on the Raspberry Pi that are available to Windows Client. The normal windows explorer can connect the the file shares that we define on the Pi.

To install Samba:

sudo apt-get install samba samba-common-bin

We then need to create samba user. These are user names and passwords that will be used by the connecting window’s users. The account names that we use must also be Linux users. We will add in the pi account into the samba password file

smbpasswd -a pi

Now we will edit the file /etc/samba/smb.conf. This coud be edited with nano or vi but you will need to run with sudo or as root.

We can define a share

[repo]
path =/repo
read only = yes

Now restart the service

sudo service samba restart

And from your Windows client you can connect to the share. I am using the IP address of the Pi as I do not have a DNS server setup the resolve the name to and IP. You can use the command

ip a

To display the IP Address.