DNS dynamic updates

Maurizio Marini Gmail marini.maurizio at gmail.com
Sat Sep 11 11:58:15 MDT 2010


On Fri, Sep 10, 2010 at 10:45 AM, Andris Lismanis <andris at lismanis.co.uk> wrote:
> My problem is that the zone file in '/usr/local/samba/private/dns' does not
> get updated when a new machine (XP/W2K3/Vista/Win7) joins domain. The only
> machine that exists in this file is samba itself. Bind9 does display any
> errors either.
this is very very strange
i got access denied in to daemon.log (debian anddebianish use
daemon.log) before fixing all the stuff



debian squeeze

have you installed bind?
 19:49:51 root at sambaserv: /usr/local/samba/private/dns # which named
/usr/local/sbin/named
 19:51:27 root at sambaserv: /usr/local/samba/private/dns #
/usr/local/sbin/named -v
BIND 9.7.2rc1

i attach a tarball containing:
-rw-r--r-- root/bind       490 2010-07-16 13:40
etc/bind/named.conf.default-zones
-rw-r--r-- root/root       237 2010-07-16 13:40 etc/bind/db.255
-rw-r----- bind/bind        77 2010-09-09 16:25 etc/bind/rndc.key
-rw-r--r-- root/bind       463 2010-07-16 13:40 etc/bind/named.conf
-rw-r--r-- root/bind       723 2010-09-10 16:17 etc/bind/named.conf.options
-rw-r--r-- root/root      2994 2010-07-16 13:40 etc/bind/db.root
-rw-r--r-- root/root      1317 2010-07-16 13:40 etc/bind/zones.rfc1918
-rw-r--r-- root/root       601 2010-07-16 13:40 etc/bind/bind.keys
-rw-r--r-- root/bind       249 2010-09-10 16:30 etc/bind/named.conf.local
-rw-r--r-- root/root       271 2010-07-16 13:40 etc/bind/db.127
-rw-r--r-- root/root       353 2010-07-16 13:40 etc/bind/db.empty
-rw-r--r-- root/root       270 2010-07-16 13:40 etc/bind/db.local
-rw-r--r-- root/root       237 2010-07-16 13:40 etc/bind/db.0
lrwxrwxrwx root/root         0 2010-09-10 18:55 etc/named.conf ->
bind/named.conf
lrwxrwxrwx root/root         0 2010-09-09 19:30 etc/rndc.key ->
/etc/bind/rndc.key
lrwxrwxrwx root/root         0 2010-09-09 19:22 usr/sbin/named ->
/usr/local/sbin/named
lrwxrwxrwx root/root         0 2010-09-09 19:23
usr/sbin/named-checkconf -> /usr/local/sbin/named-checkconf
lrwxrwxrwx root/root         0 2010-09-09 19:24
usr/sbin/named-checkzone -> /usr/local/sbin/named-checkzone
lrwxrwxrwx root/root         0 2010-09-09 16:25
usr/sbin/named-compilezone -> named-checkzone
lrwxrwxrwx root/root         0 2010-09-09 19:23
usr/sbin/named-journalprint -> /usr/local/sbin/named-journalprint
drwxr-xr-x root/root         0 2010-09-09 19:25 usr/sbin/named_org_binaries/
-rwxr-xr-x root/root      5348 2010-07-16 13:40
usr/sbin/named_org_binaries/named-journalprint-org
-rwxr-xr-x root/root    497232 2010-07-16 13:40
usr/sbin/named_org_binaries/named-org
-rwxr-xr-x root/root     26012 2010-07-16 13:40
usr/sbin/named_org_binaries/named-checkconf-org
-rwxr-xr-x root/root     25956 2010-07-16 13:40
usr/sbin/named_org_binaries/named-checkzone-org
drwxrwxrwx bind/bind         0 2010-09-11 19:25 usr/local/samba/private/dns/
-rwxrwxrwx bind/bind       685 2010-09-11 19:24
usr/local/samba/private/dns/44.168.192.in-addr.arpa.zone
-rwxrwxrwx bind/bind      2019 2010-09-11 19:13
usr/local/samba/private/dns/sambadom.cost.it.zone
-rwxrwxrwx bind/bind       767 2010-09-11 19:03
usr/local/samba/private/dns/sambadom.cost.it.zone.jnl
-rw-rw-rw- bind/bind       354 2010-09-10 17:23
usr/local/samba/private/dns.keytab
-rw-rw-rw- bind/bind      1584 2010-09-10 17:23
usr/local/samba/private/dns_update_list
-rw-r--r-- root/staff     1408 2010-09-11 19:22
usr/local/samba/private/named.conf
-rw-r--r-- root/staff     1381 2010-09-10 18:48
usr/local/samba/private/named.conf~
-r--r--r-- root/staff      244 2010-09-11 11:23
usr/local/samba/private/named.conf.update
-rw-r--r-- root/staff     2641 2010-09-10 17:23
usr/local/samba/private/named.txt


i move original binaries here:
19:43:34 root at sambaserv: /usr/sbin/named_org_binaries # ls -la
total 564
drwxr-xr-x 2 root root   4096 Sep  9 19:25 .
drwxr-xr-x 3 root root   4096 Sep  9 19:25 ..
-rwxr-xr-x 1 root root  26012 Jul 16 13:40 named-checkconf-org
-rwxr-xr-x 1 root root  25956 Jul 16 13:40 named-checkzone-org
-rwxr-xr-x 1 root root   5348 Jul 16 13:40 named-journalprint-org
-rwxr-xr-x 1 root root 497232 Jul 16 13:40 named-org

and into /usr/sbin I simlinked:

 19:45:00 root at sambaserv: /usr/sbin # ls -la named*
lrwxrwxrwx 1 root root   21 Sep  9 19:22 named -> /usr/local/sbin/named
lrwxrwxrwx 1 root root   31 Sep  9 19:23 named-checkconf ->
/usr/local/sbin/named-checkconf
lrwxrwxrwx 1 root root   31 Sep  9 19:24 named-checkzone ->
/usr/local/sbin/named-checkzone
lrwxrwxrwx 1 root root   15 Sep  9 16:25 named-compilezone -> named-checkzone
lrwxrwxrwx 1 root root   34 Sep  9 19:23 named-journalprint ->
/usr/local/sbin/named-journalprint

i installed krb5 client and simlinked:

 19:46:09 root at sambaserv: /usr/sbin # ls -la /etc/krb5.conf
lrwxrwxrwx 1 root root 34 Sep 11 10:59 /etc/krb5.conf ->
/usr/local/samba/private/krb5.conf

after joing i have see any changes into: /usr/local/samba/private/dns

only after restart:

19:48:32 root at sambaserv: /usr/local/samba/private/dns # ls -la
total 20
drwxrwxrwx 2 bind bind  4096 Sep 11 19:25 .
drwxr-sr-x 7 root staff 4096 Sep 11 19:48 ..
-rwxrwxrwx 1 bind bind   685 Sep 11 19:24 44.168.192.in-addr.arpa.zone
-rwxrwxrwx 1 bind bind  2019 Sep 11 19:13 sambadom.cost.it.zone
-rwxrwxrwx 1 bind bind   767 Sep 11 19:03 sambadom.cost.it.zone.jnl

i wrong something b/c reverse zone doesn't change but forward zone is changeed:

$ORIGIN .
$TTL 604800     ; 1 week
sambadom.cost.it        IN SOA  sambadom.cost.it. hostmaster.sambadom.cost.it. (
                                2010091018 ; serial
                                172800     ; refresh (2 days)
                                14400      ; retry (4 hours)
                                3628800    ; expire (6 weeks)
                                604800     ; minimum (1 week)
                                )
                        NS      sambaserv.sambadom.cost.it.
                        A       192.168.44.5
$ORIGIN sambadom.cost.it.
_kerberos               TXT     "SAMBADOM.COST.IT"
$ORIGIN _msdcs.sambadom.cost.it.
a940e70d-6416-4c3c-9adf-3598c3442d15 CNAME sambaserv.sambadom.cost.it.
$ORIGIN _tcp.Default-First-Site-Name._sites.dc._msdcs.sambadom.cost.it.
_kerberos               SRV     0 100 88 sambaserv.sambadom.cost.it.
_ldap                   SRV     0 100 389 sambaserv.sambadom.cost.it.
$ORIGIN _tcp.dc._msdcs.sambadom.cost.it.
_kerberos               SRV     0 100 88 sambaserv.sambadom.cost.it.
_ldap                   SRV     0 100 389 sambaserv.sambadom.cost.it.
$ORIGIN _msdcs.sambadom.cost.it.
_ldap._tcp.0ad80883-eaa6-4069-a1bf-d8377aa2d836.domains SRV 0 100 389
sambaserv.sambadom.cost.it.
gc                      A       192.168.44.5
$ORIGIN gc._msdcs.sambadom.cost.it.
_ldap._tcp.Default-First-Site-Name._sites SRV 0 100 3268
sambaserv.sambadom.cost.it.
_ldap._tcp              SRV     0 100 3268 sambaserv.sambadom.cost.it.
$ORIGIN _msdcs.sambadom.cost.it.
_ldap._tcp.pdc          SRV     0 100 389 sambaserv.sambadom.cost.it.
$ORIGIN _tcp.Default-First-Site-Name._sites.sambadom.cost.it.
_gc                     SRV     0 100 3268 sambaserv.sambadom.cost.it.
_kerberos               SRV     0 100 88 sambaserv.sambadom.cost.it.
_ldap                   SRV     0 100 389 sambaserv.sambadom.cost.it.
$ORIGIN _tcp.sambadom.cost.it.
_gc                     SRV     0 100 3268 sambaserv.sambadom.cost.it.
_kerberos               SRV     0 100 88 sambaserv.sambadom.cost.it.
_kerberos-master        SRV     0 100 88 sambaserv.sambadom.cost.it.
_kpasswd                SRV     0 100 464 sambaserv.sambadom.cost.it.
_ldap                   SRV     0 100 389 sambaserv.sambadom.cost.it.
$ORIGIN _udp.sambadom.cost.it.
_kerberos               SRV     0 100 88 sambaserv.sambadom.cost.it.
_kerberos-master        SRV     0 100 88 sambaserv.sambadom.cost.it.
_kpasswd                SRV     0 100 464 sambaserv.sambadom.cost.it.
$ORIGIN sambadom.cost.it.
sambaserv               A       192.168.44.5
$TTL 1200       ; 20 minutes
XPtest01                A       192.168.44.12


where XPTest01 is the pc just joined
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dns_update.tgz
Type: application/x-gzip
Size: 228159 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100911/35ab2a7b/attachment-0001.bin>


More information about the samba-technical mailing list