Raspberry Pi Zero W Samba Share
by Dm07087 in Circuits > Raspberry Pi
173 Views, 0 Favorites, 0 Comments
Raspberry Pi Zero W Samba Share
Hi, here is a quick step by step guide on configuring a Samba Share with Raspberry Zero W and Raspbian Jesse.
Samba - a Linux implementation of the Server Message Block protocol.
Note: This tutorial was performed using Raspbian Jesse.
Raspbian is a Debian-based computer operating system for Raspberry Pi and the Banana Pi.There are several versions of Raspbian including Raspbian Stretch and Raspbian Jessie.
If you need the image, please visit the raspberry pi website below.
https://www.raspberrypi.org/downloads/noobs/
Here we go.
Install the Samba Software Package.
Samba contains the SMB protocol, support for the Windows naming service (WINS), and support for joining Windows workgroups. Samba-common-bin contains a tool that you'll be using to register users with Samba.
Open your terminal and enter this:
$ sudo apt-get install samba samba-common-bin
Edit the Smb.conf File
Once these packages have finished installing, you will need to find and edit the Samba configuration file.
To do this, enter the text below into your terminal:
$ sudo leafpad /etc/samba/smb.conf &
The name of the workgroup can be anything that you want.
However, it may only contain alphabetical characters, and it matches the name of the workgroup that you want to join.
Add Definitions
You also need to add the following section of code to smb.conf:
The following lines must be added to the smb.conf file in the section called Share Definitions.
[pihome]
comment= Pi Home path=/home/pi
browseable=Yes writeable=Yes
only guest=no create
mask=0777 directory
mask=0777 public=no
Under these definitions, set 'only guest' and 'public' to 'no'. This will make Samba prompt for a password when a user visits a shared folder. The reason that this is done, is that when I'm logged into Windows for instance. I can login to the shared folders on my Pi, Keeping the same read/write permissions that user pi has.
Next: Our final step set your password for the share.
Set Your Password
Last step:
Now type this command in a terminal, and enter pi's password twice:
$ smbpasswd -a pi
Notes:
With Windows, if you have your device connected to the same workgroup, the RPI share should present in Windows Explorer under "Network".
Here is the Apple Documentation on how to access smb:
https://support.apple.com/en-us/HT204445
enjoy!