Home Configuring Samba
Post
Cancel

Configuring Samba

Introduction

Samba allows you to share files and folders over a network using the smb (Server Message Block) Protocol

Server Installation

Debian based OS: sudo apt-get install samba

Server Configuration

  1. Open the configuration file

    sudo nano /etc/samba/smb.conf

  2. Add the following at the bottom of config file for each share:

Syntax

1
2
3
4
5
[Share Name]
    comment = Description of Share
    path = Path to folder
    read only = make the network share read only
    browseable = make the network share browseable or not

Example

1
2
3
4
5
[Home]
    comment = Home Directory
    path = /home/ryanvanmass
    read only = no
    browseable = yes
  1. Exit the file saving the changes
  2. Restart the smbd service

    sudo systemctl smbd restart

  3. Add Samba User

    sudo smbpasswd -a "User"

Client Configuration

Linux

NOTE: This will depend on what File Manager you are using but bellow is a guideline

  1. in your File Manager locate and select add entry. It should look something like the bellow image

image

  1. Add something reasonable for the Label (eg the name of the share)

  2. For location enter the following:

    smb://ip of server/share name

Windows

  1. Open File Explorer

  2. Navigate to This PC

  3. Right Click and Select Add a network location

  4. Follow onscreen promps untill you reach this screen

Windows

  1. Enter the following:

    \\server ip\share name

  2. Enter User credentials created during Samba Configuration

  3. Enter a name for the share

  4. Select Finished
This post is licensed under CC BY 4.0 by the author.