Time to create a user that will have access to this share. With the samba configuration done, we need to restart the samba server so that these new settings take effect. Read only – This makes sure that the files are writable Valid users – This specifies which users can access the share, in our case we have specified a group (by using the symbol followed by the group name)įorce group – This will make sure any files added via the samba share will have the specified groupĬreate mask – This sets the permission of any files added to the samba shareĭirectory mask – This sets the permission of any folders added to the samba share Path – This is the directory that is used for this share – Anything between the square brackets, in this case “Main”, is the name of the share displayed on the network.Ĭomment – This is just a description of the share Here’s a breakdown of each line in the above block of code: So scroll to the very bottom of the config file, and add the following (if you named your directory different to “main” back in step 5, then you will need to update the line “path = “): To do this we need to add an entirely new block of code. Now we need to add our “main” partition as a share. Simply uncomment (remove the #) from the line that reads “# security = user” Now we need to enable user authentication for our samba shares, otherwise, anyone that has access to the network will be able to view the shares. If you have changed it, simply update it here The default workgroup is set to “WORKGROUP” which will work if you haven’t changed your windows workgroup. With the configuration file backed up, we can now edit itįirst thing to check is the workgroup. Before we do this, we will make a backup of it, just in case we need to revert back to a working state. ![]() Now we have Samba installed, we need to edit the configuration file. Sudo apt-get install samba samba-common-bin It’s now time to install Samba (this is what we’ll be using to share the hard drives on the network) to do this, run the command: ![]() Sudo mount -t auto /dev/sdb1 /media/backup Now we have our directories created, we can mount each of the hard drive partitions to these directories (if your “device” path is different remember to change it in the command, refer to your notes back on step 4): Take note of the “device” path for each partition, so in this example we need to remember:īefore we can mount the partitions, we need to create a directory for each hard drive to mount them to, we are going to create two directories, one called “main” one called “backup” you can name them whatever you like. If you have made multiple partitions on either of the hard drives, you should see extra lines on section 2 and/or 4 Number 4 – Shows us the first partition on the second hard drive Number 3 – Shows us the second hard drive Number 2 – Shows us the first partition on the first hard drive Number 1 – Shows us the first external hard drive If everything is working you should see something along these lines (looking for number 1,2,3,4 labelled in the image.) Now we need to check to see if we can see the unmounted partitions from our external hard drives, we do this by running the following command: We will be doing this all via the command line, so either SSH to your Raspberry Pi, or open up a LXTerminal if you have booted to desktop on Rasbian.īefore we can mount and use our external hard drives, we need to add support for our NTFS formatted hard drives, to do this execute this command: With everything powered on its time to start configuring your pi.Plug the power into the USB hub and Pi, and power it all on!.hdmi cable, keyboard and mouse if you’re not going to SSH to the Pi.Plug each of the external hard drives into the powered USB hub.Plug the powered USB hub into the Raspberry Pi.So first thing to do is get all the hardware plugged in and powered up.We will assume you have Raspbian installed, and are fully up-to-date.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |