We will make a user named “pi” (you can name it anything) and set a password whatever you want. Next, make a user for Samba server on Pi to make a connection to the shared network drive. Now, save the file “ smb.conf” using ctrl+x and hit enter. “ public” – This option used to give permission to any user to access the folders and if this is set to “ no” then Raspberry Pi need a valid user to grant access to shared folders.Ħ. “ create mask” and “ directory mask”– This option defines the permissions for both the files and folders and setting this to 0777 allows users to read, write, and execute. “ writeable” – This option allow the user to add files in the folder, if this option is set to yes then anyone can write in this folder. “ path” – This option contains the address of the directory that is going to be shared. For example, the shared folders will be at the following address: //raspberrypi/NAS and this address will be used in later steps while searching the available network in Windows computer. defines the address and other configurations related to the shared folders. Now, go to bottom of this file and paste the following lines path = /home/pi/shared writeable=Yes create mask=0777 directory mask=0777 public=no In this file look for “# Authentication #” and just below paste following line. Open the file using below command sudo nano /etc/samba/smb.confĥ. This file contains all the settings for sharing the media. To setup this we have to modify samba config file “ smb.conf”. Now, share this folder using samba server. In this tutorial, we will create a folder in “pi” user but it can be created in external device connected to pi using same steps as mentioned below. This folder can be anywhere including the external storage devices. Then create a folder and share it on Network storage. ![]() sudo apt-get install samba samba-common-binģ. Now install Samba packages using below command. sudo apt-get update sudo apt-get upgradeĢ. Before installing SMB packages make sure our Raspberry pi is up to date by running update command. Setting up Samba File Server on Raspberry Piġ. Learn more about setting up Raspberry Pi headlessly here without a monitor. You can use VNC or Remote Desktop connection on the laptop, or can connect your Raspberry pi with a monitor using HDMI cable. Here, we will use SSH to access Raspberry Pi on the laptop.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |