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-dc01as Hostname,samba-test.lanas Domain and10.0.0.5as 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
ens18might 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
namserverto your Router or Firewall soaptworks. After that, change to127.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
- Kerberos Servers is your DC Hostname (Example:
srv-dc01.samba-test.lan)
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
- Kerberos
ServersConfigiscpyour/var/lib/samba/private/krb5.confDC/etc/krb5.confHostname(Example:Fix Nameservers in
srv-dc01./etc/resolv.confnameserver 10.0.0.5 search samba-test.lan)
Deploy