First of all Happy New Year to all. In this new post I will be focusing on how to convert Raspberry Pi to a network file server.
For this I used the instructions from http://raspberrywebserver.com/serveradmin/share-your-raspberry-pis-files-and-folders-across-a-network.html and I am happy it worked.
In my previous post http://priyabgeek.blogspot.in/2016/12/raspberry-pi-experiments-file-server.html I had talked about attaching my Hard disk to raspberry pi and accessing files via a web server. While discussing this over Facebook I got a comment to use samba as a file server. Though I knew about it but was not sure how easy it is to set up.
So here are the steps I followed to setup samba in my Raspberry Pi 3.
1. Download the samba binaries
sudo apt-get install samba samba-common-binIn case you face issues please type sudo apt-get update and do the above step again for the installation to take place.
2. Take backup of /etc/samba/smb.conf
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bkp3. Edit /etc/samba/smb.conf to make the necessary changes for network sharing
sudo vi /etc/samba/smb.conf4. Please find the below options and make the necessary changes:
# Change this to the workgroup/NT-domain name your Samba server will part of5. Also add the path that you want to share. In my case I wanted to share my mounted External hard drive. I added this part to the end of the file /etc/samba/smb.conf
workgroup = WORKGROUP
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
# wins support = no
wins support = yes
[filedrive]6. Mounting the hard disk
comment= FileDrive
path=/mnt/usbdrive
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no
sudo mount /dev/sda1 /mnt/usbdrive/
7. Set up a samba password for pi user
sudo smbpasswd -a pi8. Finally access the samba server from windows.
Hope this short post is helpful to you as it was to me.
This is actually good to read content of this blog. A is very general and huge knowledgeable platform has been known by this blog. I in reality appreciate this blog to have such kind of educational knowledge.
ReplyDeleteCisco SF302 POE