Samba Server quick configuration

We will see the easiest way to set up quickly a Samba server on Debian.


  • OS : Debian GNU/Linux 10 (buster)
  • samba : 4.9.5


root@host:~# apt-get install samba

Minimal configuration

Set network

  • /etc/network/interface
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
# This is an autoconfigured IPv6 interface
allow-hotplug eth0
iface eth0 inet static
root@host:~# reboot

Create a folder share

root@host:~# mkdir /share

Create samba user

root@host:~# adduser --home /share --system samba

Set rights

root@host:~# chown samba: /share
root@host:~# smbpasswd -a samba


   workgroup = WORKGROUP
   server string = serv01
   path = /share
   read only = no
   valid users = samba

Configuration check and restart services

root@host:~# testparm
root@host:~# systemctl restart smbd; systemctl restart nmbd
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :