Samba Setup on Raspberry Pi

Created 01/12/2016 | How to install and setup Samba on the Raspberry Pi

This page details how to setup network file sharing using Samba on your Raspberry Pi to enable you to share files with Windows or OSX computers on your network using the SMB protocol.

Step 1: Open a terminal window and at the command prompt run this code to install Samba and Samba common.

sudo apt-get install samba samba-common-bin

Step  2. Next you need to edit the samba.conf file to change your samba settings using nano.

sudo nano /etc/samba/smb.conf

You need to find the wins support line and if there is a # at the beginning of the line you need to remove it to uncomment the text.

workgroup = your_workgroup_name
wins support = yes

You can change the workgroup name to match your home or office network.

You need to add the following code to the section called Share Definitions, the path line specifies the share path on your Raspberry Pi.

[pihome]
   comment= Pi Home
   path=/home/pi
   browseable=Yes
   writeable=Yes
   only guest=no
   create mask=0777
   directory mask=0777
   public=no

Save your changes to the smb.conf file.

Step 3. Now you need to set the password for samba using the following command:

sudo smbpasswd -a pi

Step 4: Restart samba with the following command and your new Raspberry Pi share should appear on your Windows or OSX network.

sudo /etc/init.d/samba restart

Shop

Support

Click to contact us.
X

Have any Questions?

Send us any questions about this page or product and we will reply within 24 hours.

Submit your Message

X

Have any Questions?

Thank you for contacting us.

We will respond to your enquiry in the next 24 hours.

You can find answers to many questions and additional product support in our Knowledge Base and the Community Forum.