Samba Fan
2021-Feb-22 18:08 UTC
[Samba] Conflict entries in DNS with DHCP and dynamic DNS updates
@Norbert: I can't confirm that. My observation states that a commit event is executed on both DHCP nodes, even if only one of them executes or sends a DHCP-OFFER. This observation is based on the log. I have not analyzed it with wireshark. I have to agree with Rowland that it is not a DynDNS update script problem. However, the execution of the commit on both peers must not be a bug, because both peers must be aware of each other's leases and write them to the local lease database. If anyone has an idea how to determine whether the primary node or the secondary node has been assigned responsibility for the lease and how to query that when the on-commit event is executed, a possible solution would be in sight. Currently, as a workaround, I use the query for a possible "CNF entry" when executing the on-expiry event, and then delete that entry as well. Thank you very much for this discussion!
Christian
2021-Feb-22 22:41 UTC
[Samba] Conflict entries in DNS with DHCP and dynamic DNS updates
Hi Samba fan, On 22.02.2021 19:08, Samba Fan via samba wrote:> Currently, as a workaround, I use the query for a possible "CNF entry" when executing the on-expiry event, and then delete that entry as well. > > Thank you very much for this discussion!could you share a code sniplet? I run the following code every once in a while to purge those entries: IFS= ldbsearch --cross-ncs -H /var/lib/samba/private/sam.ldb -b 'CN=MicrosoftDNS,DC=DomainDnsZones,DC=iqo,DC=uni-hannover,DC=de' '(DC=*CNF:*)' dn | sed -e 's/\\/\\\\/g' | grep ^dn | while read dn ; do ? ldbdel -H /var/lib/samba/private/sam.ldb "${dn#dn: }" done Not sure whether this is the right thing though... Thanks, Christian