Bug 54189 - Manual steps required after ip change (dhcp) of samba DC
Manual steps required after ip change (dhcp) of samba DC
Status: NEW
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-12-03 10:39 CET by Felix Botner
Modified: 2021-12-03 10:39 CET (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2021-12-03 10:39:09 CET
After getting a new IP address the following (at least) are required.


     if [ -n "$old_ip" ]; then
        udm dns/host_record modify --binddn "$binddn" --bindpwd "$admin_password" \
            --dn "relativeDomainName=ForestDnsZones,zoneName=$domain,cn=dns,$ldap_base" \
            --append a="$ip" --remove a="$old_ip"
        udm dns/host_record modify --binddn "$binddn" --bindpwd "$admin_password" \
            --dn "relativeDomainName=DomainDnsZones,zoneName=$domain,cn=dns,$ldap_base" \
            --append a="$ip" --remove a="$old_ip"
        udm dns/host_record modify --binddn "$binddn" --bindpwd "$admin_password" \
            --dn "relativeDomainName=gc._msdcs,zoneName=$domain,cn=dns,$ldap_base" \
            --append a="$ip" --remove a="$old_ip"
        udm dns/forward_zone modify --binddn "$binddn" --bindpwd "$admin_password" \
            --dn "zoneName=$domain,cn=dns,$ldap_base" \
            --remove a="$old_ip" --append a="$ip"
       # this is not samba related, so maybe another bug?
        udm dns/host_record modify --binddn "$binddn" --bindpwd "$admin_password" \
            --dn "relativeDomainName=ucs-sso,zoneName=$domain,cn=dns,$ldap_base" \
            --append a="$ip" --remove a="$old_ip"
     fi

If the primary DC changes its ip, on replica/backup

    samba-tool dns update -U"Administrator%$admin_password" localhost samba.test primary A "$old_ip_master" "$masterip"
    /etc/init.d/samba restart

Maybe we could do some of this automatically.