Problem: When Renaming A Computer The Old DNS Entry Remains In DNS

Problem: When Renaming A Computer The Old DNS Entry Remains In DNS

You have renamed a computer ie through Web-Frontend (UMC: Devices - Computer) but your old name can still be resolved.
Example:
Previous name: old.multi.ucs
Renamed to: new.multi.ucs
[Wait a couple of seconds until the replication has taken place]

root@ucs:/var/log# host new.multi.ucs
new.multi.ucs has address 192.168.42.100
root@ucs:/var/log# host old.multi.ucs
old.multi.ucs has address 192.168.42.100

Environment

This happens only when the dns backend in UCS is set to “samba4”. Verify your setting by:

root@ucs:~# ucr get dns/backend
samba4

Solution

Option 1

Wait for the bug regarding this issue being fixed and published.

Option 2

Ignore the additional entry as it usually does not do any harm.

Option 3

Switch DNS backend to ldap instead of samba4.

root@ucs:~# ucr set dns/backend=ldap
Setting dns/backend
File: /etc/systemd/system/bind9.service.d/10-configure-backend.conf
File: /etc/init.d/bind9
root@ucs:~# systemctl restart bind9 nscd
root@ucs:~# host old.multi.ucs
Host old.multi.ucs not found: 3(NXDOMAIN)

Option 4

Use ldbdel to remove the DNS entry in Samba.


root@ucs:~# univention-s4search --cross-ncs "DC=old" dn
dn: DC=old,DC=multi.ucs,CN=MicrosoftDNS,DC=DomainDnsZones,DC=multi,DC=ucs
root@ucs:~# ldbdel -H /var/lib/samba/private/sam.ldb "DC=old,DC=multi.ucs,CN=MicrosoftDNS,DC=DomainDnsZones,DC=multi,DC=ucs"
Mastodon