[Samba] samba4+bind on centos

NOC noc at nieuwland.nl
Tue Jun 11 03:54:33 MDT 2013

Hi All

I've started again from scratch, following the wikipage at 

I'm using bind 9.8.5-P1 and samba4 master (from yesterday I guess)

compiling from scratch:
bind: ./configure --with-gssapi=/usr/include/gssapi --with-dlopen=yes

And the given named.conf in /etc/bind/ (as this is where I want the 
config to reside)

I've include the local zones as provided and I modified the named in a 
few places:
  diff orig-named.conf /etc/bind/named.conf
<        directory "/var/named";
 >        directory "/etc/bind";
<        forwarders {;; };
 >        forwarders {;; };
<      ;
<                ...other networks you want to allow to query your DNS...;
 >      ;
 >     ;
 >                #...other networks you want to allow to query your DNS...;
<      ;
<                ...other networks you want to allow to do recursive 
 >      ;
 >     ;
 >                #...other networks you want to allow to do recursive 
 >       tkey-gssapi-keytab "/usr/local/samba/private/dns.keytab";
 > include "/usr/local/samba/private/named.conf";

This is just so bind actually works and the files created by provision 
are included

Provision was done using:
samba-tool domain provision
Realm: example
  Domain [example]: example.com
  Server Role (dc, member, standalone) [dc]: dc
Administrator password:
Retype password:
Looking up IPv4 addresses
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up share.ldb
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setting up idmap db
Setting up SAM db
Setting up sam.ldb partitions and settings
Setting up sam.ldb rootDSE
Pre-loading the Samba 4 and AD schema
Adding DomainDN: DC=example
Adding configuration container
Setting up sam.ldb schema
Setting up sam.ldb configuration data
Setting up display specifiers
Modifying display specifiers
Adding users container
Modifying users container
Adding computers container
Modifying computers container
Setting up sam.ldb data
Setting up well known security principals
Setting up sam.ldb users and groups
Setting up self join
Adding DNS accounts
Creating CN=MicrosoftDNS,CN=System,DC=example
Creating DomainDnsZones and ForestDnsZones partitions
Populating DomainDnsZones and ForestDnsZones partitions
See /usr/local/samba/private/named.conf for an example configuration 
include file for BIND
and /usr/local/samba/private/named.txt for further documentation 
required for secure DNS updates
Setting up sam.ldb rootDSE marking as synchronized
Fixing provision GUIDs
A Kerberos configuration suitable for Samba 4 has been generated at 
Once the above files are installed, your Samba4 server will be ready to use
Server Role:           active directory domain controller
Hostname:              sambabind02
NetBIOS Domain:        EXAMPLE.COM
DNS Domain:            example
DOMAIN SID:            S-1-5-21-294307859-3325552197-969134079

stopped/started bind using the new config file

Then I started /usr/local/samba/sbin/samba -D

Then command:
# /usr/local/samba/sbin/samba_dnsupdate --verbose --all-names
IPs: ['']
Traceback (most recent call last):
   File "/usr/local/samba/sbin/samba_dnsupdate", line 511, in <module>
   File "/usr/local/samba/sbin/samba_dnsupdate", line 124, in 
     raise e
RuntimeError: kinit for SAMBABIND02$@EXAMPLE failed (Cannot contact any 
KDC for requested realm)

It appears that samba_dnsupdate tries to get a ticket from the KDC that 
it tries to find using DNS, but the record isn't yet inserted in the 
bind dns database. Is it a chicken/egg problem?

Now either the wiki hasn't been fully tested or it's missing a obvious step

Any clues?


More information about the samba mailing list