Home Learning Samba Setup

Samba Setup

by shedboy71

How to install and setup Samba on the Raspberry Pi

Here we detail how to setup network file sharing using Samba on your Raspberry Pi to enable you to share files with other computers on your network.

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

sudo apt-get install samba samba-common-bin

Step 2. The next step is that you need to edit the samba.conf file to change your samba settings using nano.

sudo nano /etc/samba/smb.conf

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

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.


comment= pihome
 only guest=no
 create mask=0777
 directory mask=0777

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 network.

sudo /etc/init.d/samba restart

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More