[Samba] Question RE upgrading Linux domain member

Rowland Penny
Thu, 08 Jan 2026 16:44:52 -0000

On Thu, 8 Jan 2026 16:24:35 +0100
Jakob Curdes via samba <samba at lists.samba.org> wrote:

> Hello, I want to do an OS upgrade with a larger Linux domain member
> (DCs are SAMBA4, but probably irrelevant).
>
> My plan is to clone the system, decativate all samba services, , then
> demote the old system from the domain, thne join the new one. But
> probably I need to demote the new system (same name) also before
> re-joning? Can I demote two times ???
>
> What happens if I just join the new system to the domain with the
> same name? A name change would be hard to do as the name is on all
> the file shares on various client PCs.
>
> Sure there must be a way to do this right without changing the name
> and without long downtimes?
>
> Regards, Jakob

Your Linux domain member should have two or three records in AD:

A computer record in 'CN=Computers'
A forward DNS record in DC=your.dns.domain,CN=MicrosoftDNS,DC=Doma
 inDnsZones
Possibly a reverse dns record in
DC=1.168.192.in-addr.arpa,CN=MicrosoftDNS,DC=DomainDnsZones

Where '1.168.192.in-addr.arpa' is your reversezone

You can see yours with:

sudo ldbsearch -H ldap://YOUR_DC_HOSTNAME -P --cross-ncs -b
dc=your,dc=dns,dc=domain -s sub name=<your_domain_members_host>

and

sudo ldbsearch -H ldap://YOUR_DC_HOSTNAME -P --cross-ncs -b
dc=your,dc=dns,dc=domain -s sub name=IPADDRESS

Obviously replace the placeholders above with your information.

Running 'net ads leave' should remove the computers record from
'CN=Computers' and you will probably have to remove the DNS records
yourself.

Having said that, if you backup any required data from the old Linux
domain member and then demote it, you should then be able to bring up
your new Linux domain member, change its hostname and IP, reboot and
then join the domain and it should just work.
I would check the dns records again after the join.
Once you are sure everything is working correctly, restore your backed
up data.

Rowland