Saturday, May 17, 2014

Building a Raspberry Pi NAS - Part 2: Sharing files on the network

This post is part of a series on building a low power, low cost NAS system based on a raspberry pi. On this post we share raspberry's files with the windows file sharing protocol (SMB) so that they can be accessed from any machine on the network, including windows. Installing Samba on the raspberry pi:
sudo apt-get update
sudo apt-get install samba samba-common-bin
(press Y)
editing samba config file:
sudo nano /etc/samba/smb.conf
Find line with wins "support = no" and change to "wins support = yes" In the end of the file paste the following definitions. We are sharing two volumes "home" and "media1". Home is smaller and files will be periodically backed up. media is larger but without redundancy.
[home]
   comment=Home
   path=/home/pi/mnt/home
   browseable=Yes
   writeable=Yes
   only guest=no
   create mask=0777
   directory mask=0777
   public=no

[media1]
   comment=media1
   path=/home/pi/mnt/media1
   browseable=Yes
   writeable=Yes
   only guest=no
   create mask=0777
   directory mask=0777
   public=no
Give a password for samba user pi
sudo smbpasswd -a pi

No comments:

Post a Comment