Skip to main content

Installation on Debian 13

This expects a freshly installed Debian 13 VM. Not a LXC Container

Preparation

What you need

  • Decide a Hostname, Domain and IP

It will be srv-dc01 as Hostname, samba-test.lan as Domain and 10.0.0.5 as IP

Updates & Upgrades

apt update -y
apt upgrade -y
apt full-upgrade -y

Core Dependencies

apt install -y chrony vim ethtool

Configure Hostname

hostnamectl set-hostname srv-dc01

Configure /etc/hosts

127.0.0.1       localhost
10.0.0.5        srv-dc01.samba-test.lan srv-dc01

Configure Network

Modify /etc/network/interfaces

Interface ens18 might be named differently for you

auto ens18
iface ens18 inet static
  address 10.0.0.5/20
  gateway 10.0.0.254

Configure Timesync

systemctl enable --now chrony
chronyc tracking

Validate that Time-Sync offset is within max. 5 Seconds

Disable systemd-resolved

systemctl disable --now systemd-resolved
rm -f /etc/resolv.conf

Modify /etc/resolv.conf

For Provisioning, set namserver to your Router or Firewall so apt works. After that, change to 127.0.0.1

nameserver 10.0.0.254
search samba-test.lan

Ensure no DNS Server is running anymore

ss -tlnp | grep :53

This should not return anything.

Install Samba4

Install Packages

apt install -y acl attr samba winbind libpam-winbind libnss-winbind krb5-config krb5-user dnsutils python3-setproctitle samba-ad-dc

Mask Servies

systemctl disable --now smbd nmbd winbind
systemctl mask smbd nmbd winbind

Domain Provisioning

Remove existing Configuration File

rm -f /etc/samba/smb.conf

Provisiong Samba Domain

samba-tool domain provision --use-rfc2307 --realm=SAMBA-TEST.LAN \
  --domain=SAMBA-TEST --server-role=dc --dns-backend=SAMBA_INTERNAL