Friday, 29 December 2017

Setup Raspberry Pi Samba share

I almost always setup a samba share on every Raspberry Pi I install, it allows me to easily share files and work on my projects - so I thought I had better write down how I do it.
Install samba:
sudo apt-get install samba
Modify the Samba config file to add a share called pihome which points to the /home/pi directory:
sudo nano /etc/samba/smb.conf
Scroll to the bottom and add the following:

protocol = SMB2

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

Setup a samba password for the Pi user:
sudo smbpasswd -a pi
Restart the samba service:
sudo service smbd restart
You should now be able to connect to your Pi using the address:
//ip_address_of_pi/pihome

No comments:

Post a Comment