DLZ backend problem, samba_upgradedns not repair hardlinks
Franta Hanzlík via samba <[email protected]>
| Newsgroups | gmane.network.samba.general |
|---|---|
| Message-ID | <[email protected]> |
samba-tool dns add/query/delete seems as behaves fine, but dig @DC
say NXDOMAIN on new items query (query on itema as dc and some other
DNS zone members are OK).
Same as described in paragraph "New DNS Entries Are Not Resolvable" at
https://wiki.samba.org/index.php/BIND9_DLZ_DNS_Back_End
and some hardlinks in Samba workdirs are broken. Wiki page recommends
repair it using samba_upgradedns, but this not helped there:
root@dc1:/var/log/named# ls -lai /var/lib/samba/bind-dns/dns/sam.ldb.d/
total 25136
181878 drwxrwx--- 2 root bind 4096 Aug 18 17:19 .
181877 drwxrwx--- 3 root bind 4096 Aug 18 17:19 ..
181882 -rw-rw---- 1 root bind 6725632 Aug 18 17:19 'CN=CONFIGURATION,DC=ZEK,DC=HOME.ldb'
181881 -rw-rw---- 1 root bind 8613888 Aug 18 17:19 'CN=SCHEMA,CN=CONFIGURATION,DC=ZEK,DC=HOME.ldb'
183369 -rw-rw---- 2 root bind 4333568 Aug 18 17:53 'DC=DOMAINDNSZONES,DC=ZEK,DC=HOME.ldb'
183370 -rw-rw---- 2 root bind 4333568 Aug 18 17:53 'DC=FORESTDNSZONES,DC=ZEK,DC=HOME.ldb'
181879 -rw-rw---- 1 root bind 1286144 Aug 18 17:19 'DC=ZEK,DC=HOME.ldb'
183360 -rw-rw---- 2 root bind 421888 Aug 18 17:53 metadata.tdb
root@dc1:/var/log/named# ls -lai /var/lib/samba/private/sam.ldb.d/
total 55808
183359 drwx------ 2 root root 4096 Aug 18 17:19 .
166251 drwxr-xr-x 6 root root 4096 Aug 18 17:19 ..
183367 -rw------- 1 root root 8470528 Aug 18 17:53 'CN=CONFIGURATION,DC=ZEK,DC=HOME.ldb'
183366 -rw------- 1 root root 10588160 Aug 18 17:53 'CN=SCHEMA,CN=CONFIGURATION,DC=ZEK,DC=HOME.ldb'
183369 -rw-rw---- 2 root bind 4333568 Aug 18 17:53 'DC=DOMAINDNSZONES,DC=ZEK,DC=HOME.ldb'
183370 -rw-rw---- 2 root bind 4333568 Aug 18 17:53 'DC=FORESTDNSZONES,DC=ZEK,DC=HOME.ldb'
183368 -rw------- 1 root root 28971008 Aug 18 17:53 'DC=ZEK,DC=HOME.ldb'
183360 -rw-rw---- 2 root bind 421888 Aug 18 17:53 metadata.tdb
root@dc1:/var/log/named# samba_upgradedns --dns-backend=BIND9_DLZ
lpcfg_load: refreshing parameters from /etc/samba/smb.conf
Reading domain information
lpcfg_load: refreshing parameters from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
DNS accounts already exist
No zone file /var/lib/samba/bind-dns/dns/ZEK.HOME.zone (normal)
DNS partitions already exist
dns-dc1 account already exists
See /var/lib/samba/bind-dns/named.conf for an example configuration include file for BIND
and /var/lib/samba/bind-dns/named.txt for further documentation required for secure DNS updates
Finished upgrading DNS
root@dc1:/var/log/named# systemctl restart named
root@dc1:/var/log/named# ls -lai /var/lib/samba/bind-dns/dns/sam.ldb.d/
total 25136
181877 drwxrwx--- 2 root bind 4096 Aug 18 17:55 .
148951 drwxrwx--- 3 root bind 4096 Aug 18 17:55 ..
181881 -rw-rw---- 1 root bind 6725632 Aug 18 17:55 'CN=CONFIGURATION,DC=ZEK,DC=HOME.ldb'
181880 -rw-rw---- 1 root bind 8613888 Aug 18 17:55 'CN=SCHEMA,CN=CONFIGURATION,DC=ZEK,DC=HOME.ldb'
183369 -rw-rw---- 2 root bind 4333568 Aug 18 17:53 'DC=DOMAINDNSZONES,DC=ZEK,DC=HOME.ldb'
183370 -rw-rw---- 2 root bind 4333568 Aug 18 17:53 'DC=FORESTDNSZONES,DC=ZEK,DC=HOME.ldb'
181878 -rw-rw---- 1 root bind 1286144 Aug 18 17:55 'DC=ZEK,DC=HOME.ldb'
183360 -rw-rw---- 2 root bind 421888 Aug 18 17:53 metadata.tdb
root@dc1:/var/log/named# ls -lai /var/lib/samba/private/sam.ldb.d/
total 55808
183359 drwx------ 2 root root 4096 Aug 18 17:55 .
166251 drwxr-xr-x 6 root root 4096 Aug 18 17:55 ..
183367 -rw------- 1 root root 8470528 Aug 18 17:53 'CN=CONFIGURATION,DC=ZEK,DC=HOME.ldb'
183366 -rw------- 1 root root 10588160 Aug 18 17:53 'CN=SCHEMA,CN=CONFIGURATION,DC=ZEK,DC=HOME.ldb'
183369 -rw-rw---- 2 root bind 4333568 Aug 18 17:55 'DC=DOMAINDNSZONES,DC=ZEK,DC=HOME.ldb'
183370 -rw-rw---- 2 root bind 4333568 Aug 18 17:53 'DC=FORESTDNSZONES,DC=ZEK,DC=HOME.ldb'
183368 -rw------- 1 root root 28971008 Aug 18 17:53 'DC=ZEK,DC=HOME.ldb'
183360 -rw-rw---- 2 root bind 421888 Aug 18 17:55 metadata.tdb
Hardlinks have files DC=DOMAINDNSZONES*, DC=FORESTDNSZONES* and metadata.tdb
only, not other three files.
A while ago I was solving another problem with samba_upgradedns - I don't
know if it's related to this one - samba_upgradedns crashed because it
couldn't find the DnsAdmin group - which, it seems, must be permanently in
CN=Users,DC=_domain_ :
root@dc1:~# samba_upgradedns --dns-backend=BIND9_DLZ
Reading domain information
Traceback (most recent call last):
File "/usr/sbin/samba_upgradedns", line 292, in <module>
names = find_provision_key_parameters(ldbs.sam, ldbs.secrets, ldbs.idmap,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/samba/provision/__init__.py", line 341, in find_provision_key_parameters
dns_admins_sid = get_dnsadmins_sid(samdb, names.domaindn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/samba/provision/sambadns.py", line 72, in get_dnsadmins_sid
res = samdb.search(base=base_dn, scope=ldb.SCOPE_BASE, attrs=["objectSid"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ldb.LdbError: (32, 'No such Base DN: CN=DnsAdmins,CN=Users,DC=zek,DC=home')
and here it was (I don't know why) in OU=System_Groups,DC=_domain_
After moving (
root@dc1:~# samba-tool group move DnsAdmins CN=Users -A /etc/samba/h
Moved group "DnsAdmins" into "CN=Users,DC=zek,DC=home"
) the samba_upgradedns program didn't crash anymore.
Any idea where problem could be and how resolve it?
--
Thanks in advance, Franta Hanzlík
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba