Easy steps to Setup Windows NAS storage using SAMBA server on Raspberry Pi
- Connect pi using putty or other similar tool
- Now lets make sure system is up to date using
- sudo apt-get update
- Connect your external HDD to Raspberry Pi. Execute following command and look for
- pi@raspbmc:~$ sudo fdisk -l
- Disk /dev/mmcblk0: 3965 MB, 3965190144 bytes
- 4 heads, 16 sectors/track, 121008 cylinders, total 7744512 sectors
- ...........................................................
- ...........................................................
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x00186eb3
- Device Boot Start End Blocks Id System
- /dev/sda1 63 1953520064 976760001 c W95 FAT32 (LBA)
- Let's create following directory
- sudo mkdir /mnt/hdd_tb
- Edit following file and add last line
- sudo vi /etc/fstab
- proc /proc proc defaults 0 0
- devpts /dev/pts devpts defaults 0 0
- /dev/mmcblk0p1 /boot vfat defaults 0 0
- /dev/mmcblk0p2 none swap sw 0 0
- /dev/mmcblk0p3 / ext4 defaults,noatime 0 0
- /dev/sda1 /mnt/hdd_tb vfat defaults 0 0
- Mount the HDD
- sudo mount -a
- List the hdd contents
- ls /mnt/hdd_tb
- Now install SAMBA
- sudo apt-get install samba
- sudo apt-get install samba-common-bin
- Edit smb.conf based on your need using following command. There are many tutorials available online.
- sudo vi /etc/samba/smb.conf
- [usb]
- comment = USB Share
- path = /mnt/hdd_tb
- read only = No
- create mask = 0777
- directory mask = 0777
- guest only = Yesguest ok = Yes
- Start SAMBA service
- sudo service samba restart
- Access the files using
- \\<IP ADDREES>\usb