How to set up a Samba server on a Raspberry Pi

These instructions assume that you already have an external drive mounted on your Raspberry Pi and that it is accessible from the directory /media/USB_Drive. A tutorial describing how to mount an external drive on a Raspberry Pi is available here

Update your repository

cd ~
sudo apt-get update

Install samba

sudo apt-get install samba samba-common-bin

Edit the samba config file

sudo nano /etc/samba/smb.conf

Navigate to the end of the file and add your external drive information

   comment = USB Drive
   path = /media/USB_Drive/
   browseable = yes
   writeable = yes
   only guest = no
   create mask = 0777
   directory mask = 0777
   public = yes
   force user = root

Save changes and exit the config file

press control x
press y
press return

Restart the samba service

sudo /etc/init.d/samba restart

Your external drive should now be available to any computer attached to your network