In this tutorial, I'll show you how to quickly set up a Samba server on Debian. The aim is to have a network share available as quickly as possible from Windows, GNU/Linux or any smb compatible device. Personally, I often use it to create a temporary share when I need it.
root@host:~# apt update && apt install samba
We can now move on to configuration. First, we need to configure the IP address to which Samba clients will connect, followed by the Samba server configuration.
# 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
address 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.254
root@host:~# reboot
root@host:~# mkdir /share
root@host:~# adduser --home /share --system samba
root@host:~# chown samba: /share
root@host:~# smbpasswd -a samba
root@host:~# > /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
server string = serv01
[share]
path = /share
read only = no
valid users = samba
root@host:~# testparm
root@host:~# systemctl restart smbd; systemctl restart nmbd
Congratulations, sharing is ready! 🤝 The share will be accessible with the samba login and password previously defined with the smbpasswd command.
Contact :