Friday, January 31, 2014

Samba4 Active Directory Domain Controller on Debian Wheezy

#We will use BIND9_DLZ as backend, we need to add a compile flag to bind9

sudo su -l

apt-get install build-essential fakeroot devscripts

#download bind9 src

apt-get source bind9

cd bind9-9.8.4.dfsg.P1

vi debian/rules

#add the following line after  ./configure
--dl-open=yes \

# get the dependencies
apt-get build-dep bind9

#build
fakeroot debian/rules binary

#install
dpkg -i ../bind9-9.8.4.dfsg.P1_<your arch>.deb

#add backports repo

vi /etc/apt/sources.lst

#add the following line to sources.list
deb http://ftp.us.debian.org/debian wheezy-backports main

#install samba from backports (version 4)
apt-get install -t wheezy-backports samba

#check your samba version is 4
samba -V

# provision domain
/usr/local/samba/bin/samba-tool domain provision --use-rfc2307 --interactive

service samba start
apt-get install chkconfig
chkconfig samba on

#setup bind,kerberos, etc
http://wiki.samba.org/index.php/Dns-backend_bind
http://wiki.samba.org/index.php/Samba_AD_DC_HOWTO

1 comment:

  1. Just a small note, with the Wheezy version of Bind (currently bind9-9.8.4.dfsg.P1), you can't use the option "--dl-open=yes" on configure because it won't work, it won't be recognized as a valid option.
    Instead, use the option " --with-dlz-dlopen=yes" and it will build properly.

    Thank you for your post. It has been really helpful!

    ReplyDelete