I'm attempting to setup up Samba4 ADDC on rocky-linux-8. After everything has been configured and installed and I check on the status of Samba it tells me that it's actively running yet at the end of the check I receive dns_update
errors.
My samba AD seems to be running fine but I would like to know why these errors are occurring and if there is a way to resolve them
Apr 12 11:33:58 samba80Test samba[15265]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[corp.fin-rec.com] name[_ldap._tcp.Default-First-Site-Name._sites.DomainDnsZones] [>
Apr 12 11:33:58 samba80Test samba[15265]: [2023/04/12 11:33:58.072095, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
Apr 12 11:33:58 samba80Test samba[15265]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[corp.fin-rec.com] name[ForestDnsZones] [WERR_DNS_ERROR_RECORD_ALREADY_EXISTS] - (9>
Apr 12 11:33:58 samba80Test samba[15265]: [2023/04/12 11:33:58.072139, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
Apr 12 11:33:58 samba80Test samba[15265]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[corp.fin-rec.com] name[_ldap._tcp.ForestDnsZones] [WERR_DNS_ERROR_RECORD_ALREADY_E>
Apr 12 11:33:58 samba80Test samba[15265]: [2023/04/12 11:33:58.072179, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
Apr 12 11:33:58 samba80Test samba[15265]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[corp.fin-rec.com] name[_ldap._tcp.Default-First-Site-Name._sites.ForestDnsZones] [>
Apr 12 11:33:58 samba80Test samba[15265]: [2023/04/12 11:33:58.109904, 0] ../../source4/dsdb/dns/dns_update.c:86(dnsupdate_nameupdate_done)
Apr 12 11:33:58 samba80Test samba[15265]: dnsupdate_nameupdate_done: Failed DNS update with exit code 29 ```
It is just that Samba
is trying to update the DNS records, but the records already exist.
You can first check that the DNS records that cause your error are OK with /usr/local/samba/sbin/samba_dnsupdate --verbose --all-names
if it need to be updated use this, as an example if you wanted to remove ldap._tcp.Default-First-Site-Name._sites.DomainDnsZones
samba-tool dns delete <your-dns-server-ip> corp.fin-rec.com _ldap._tcp.Default-First-Site-Name._sites.DomainDnsZones SRV <your-dc-ip>
then we restart systemctl restart samba