A couple of weeks ago, my Macbook suddenly crashed and I lost some important data in it. At that time, I really wished that I have a NAS or Network Attached Storage, so I can simply backup my data and retrieve it when I need it. Also, I was having an external 1 TB hard-drive. It is a great opportunity to both experiment and make something useful with Raspberry Pi. So, I decided to make a NAS with my Raspberry Pi and Samba server.
Starting with the Basics
Let’s start with the basics. It’s very important that when you logged in to pi user, change the default password first. User passwd command and change the default password.
Now, let’s update and upgrade everything in the our pi.
This will take some time, don’t worry. When it finishes, reboot the device and reconnect.
Also, let’s get our IP address, we will need this to connect from other devices.
Installing the necessary packages
We need to install samba and its utilities and according to your hard-drive, you need to install support packages for it.
Mounting the hard-drive
In order to use our hard-drive in local file system, we need to mount that drive to a folder. So, let’s create a folder to mount.
We can see our freshly created “nas” folder, great! Let’s mount the hard-drive to that folder. First let’s find our hard-drive.
After this step, if you go to /nas folder, you should be able to see the contents of hard-drive.
Configuring Samba Server
We need to configure our samba server in order to access it. So, let’s go the config file and edit the values for our needs.
Great! Now, let’s add a samba user and let’s assign that user to use our samba server from other machines.
Connecting the server
Go to “Finder” and press “cmd + K”. Then write “smb://192.168.10.100” and press “Connect”. Then select the “NAS Server” and you should see it on your Finder.
Go to “File Explorer” and write “\\192.168.10.100” at the top bar. You should see the “NAS Server”. Right click and press “Map network drive..” Then, write the username and password of “samba” user and you should be good to go!
I hope you liked what you read and I am really looking forward to seeing you in the next one! If you don’t want to miss any content, you can subscribe to the website and I will let you know whenever something new going on here!
Also you can reach out to me from the “Contact” section. Feel free to share your thoughs or suggest any ideas. I am reading all the messages and I will reply yours as soon as possible!
As you might know me, I like coffee and high-quality content. If you want to support me and my effort, why not a little caffeine boost ha? 😎
Until next one,