Knowledge Base

The AB Electronics UK Knowledge Base provides support solutions, tutorials and troubleshooting guides.

Knowledge Base

Samba Setup on Raspberry Pi

How to install and setup Samba on the Raspberry Pi

This page details how to set up network file sharing using Samba on your Raspberry Pi to enable you to share files with Windows or OSX computers on your network using the SMB protocol.

Step 1: Open a terminal window, and at the command prompt, run this code to install Samba and Samba Common.

sudo apt-get install samba samba-common-bin

Step  2. Next, you need to edit the samba.conf file to change your Samba settings using nano.

sudo nano /etc/samba/smb.conf

You need to find the wins support line, and if there is a # at the beginning of the line, you need to remove it to uncomment the text.

workgroup = your_workgroup_name
wins support = yes

You can change the workgroup name to match your home or office network.

Add the following code to the Share Definitions section; the path line specifies the share path on your Raspberry Pi.

[pihome]
comment= Pi Home
path=/home/pi
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no

Save your changes to the smb.conf file.

Step 3. Now, you need to set the password for Samba using the following command:

sudo smbpasswd -a pi

Step 4: Restart Samba with the following command, and your new Raspberry Pi share should appear on your Windows or OSX network.

sudo service smbd restart

 


Was this article helpful? Yes No

Please tell us how we can improve this article:

Submit
Created 01/12/2016 | Last Updated: 01/01/2024

Related Expansion Boards

Order a 1 Wire Pi Plus Photo of 1 Wire Pi Plus
1 Wire Pi Plus

1 Wire interface for the Raspberry Pi

£14.39 Ex VAT: £11.99
Add to Cart
Order a ADC Pi Photo of ADC Pi
ADC Pi

8 Channel 17-bit Single-Ended Analogue to Digital converter for the Raspberry Pi

£19.19 Ex VAT: £15.99
Add to Cart
Order a Breakout Pi Plus Photo of Breakout Pi Plus
Breakout Pi Plus

Prototyping board for Raspberry Pi

£4.79 Ex VAT: £3.99
Add to Cart
Order a Breakout Pi Zero Photo of Breakout Pi Zero
Breakout Pi Zero

Prototyping board for Raspberry Pi Zero

£4.67 Ex VAT: £3.89
Add to Cart
Order a Expander Pi Photo of Expander Pi
Expander Pi

Analogue, Digital and RTC Expansion Interface for the Raspberry Pi

£27.59 Ex VAT: £22.99
Add to Cart
Order a IO Pi Plus Photo of IO Pi Plus
IO Pi Plus

32 channel MCP23017 digital I/O expander for the Raspberry Pi

£14.39 Ex VAT: £11.99
Add to Cart
Order a RS485 Pi Photo of RS485 Pi
RS485 Pi

RS485 serial interface for the Raspberry Pi

£14.39 Ex VAT: £11.99
Add to Cart
Order a Serial Pi Plus Photo of Serial Pi Plus
Serial Pi Plus

RS232 Serial Port for the Raspberry Pi

£13.19 Ex VAT: £10.99
Add to Cart

Related Articles

Raspberry Pi GPIO Pin Usage
Raspberry Pi GPIO Pin mapping and connections
PCB Header Assembly Jig
Using the PCB Header Assembly Jig
Samba Setup on Raspberry Pi
How to install and setup Samba on the Raspberry Pi
Set a static IP Address on Raspberry Pi OS Bookworm
How to use a static network IP Address on the Raspberry Pi
Set a static IP Address on Raspberry Pi OS Buster
How to use a static network IP Address on the Raspberry Pi
Set a static IP Address on Raspberry Pi OS Wheezy
Static Network IP Address Setup on the Raspberry Pi
I2C Part 1 - Introducing I2C
An introduction to the I²C protocol
I2C Part 2 - Enabling I2C on the Raspberry Pi
How to enable I2C on the Raspberry Pi
I2C Part 3 - I2C tools in Linux
An introduction to I²C tools in Linux
I2C Part 4 - Programming I2C with Python
How to get started with Programming I²C with Python
SPI and Python on Raspberry Pi OS
Enabling SPI on the Raspberry Pi and installing python py-spidev
Using Pythonpath with the Python Libraries
Adding the library path to startup
Connecting Expansion Boards to the Raspberry Pi 400
Expanding the Potential of Your Raspberry Pi 400