Active Directory DC on Debian / Samba 4

Cheat sheet guide to provisioning an Active Directory Domain Controller with Samba 4 on Debian

Published Dec 1, 2014 |
Scroll

Preparation

Configure Networking

/etc/network/interfaces

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
	address 192.168.1.20
	netmask 255.255.255.0
	gateway 192.168.1.1

dns-nameservers 8.8.8.8
dns-search domain.local

/etc/hostname

dc1

/etc/hosts

127.0.0.1 localhost
127.0.1.1 dc1.domain.local dc1

Configure Testing Repos

Samba 4 is only available in the Testing repos for Debian.

/etc/apt/sources.list

deb http://ftp.uk.debian.org/debian/ testing main
deb-src http://ftp.uk.debian.org/debian/ testing main
deb http://security.debian.org/ testing/updates main
deb-src http://security.debian.org/ testing/updates main

Update & Install Prerequisites

apt-get update
apt-get dist-upgrade
apt-get install ntp samba smbclient

NTP

update-rc.d ntp defaults

Config Files

smb.conf is generated by samba-tool in the next step.

rm /etc/samba/smb.conf

Reboot

reboot

Provision Domain

Samba Configuration

samba-tool domain provision --use-rfc2307 --interactive
ln -s /var/lib/samba/private/krb5.conf /etc/

Fix Networking

Remove the external DNS server:

/etc/network/interfaces

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
	address 192.168.1.20
	netmask 255.255.255.0
	gateway 192.168.1.1

dns-nameservers 192.168.1.20
dns-search domain.local

Reboot

reboot
Next up

ZyXEL Router CLI Reference

List of commands for managing the ZyXEL AMG1302-T10B via SSH

Published Sep 17, 2014 |