Rimozione di un DC aggiuntivo —
Per i motivi più disparati può rendersi necessario togliere un DC dal dominio. Il primo passo è verificare che questo DC non sia il proprietario di ruoli FSMO. FSMO sta per Flexible Single Master Operations (oggi ufficialmente chiamati Operations Masters): in Active Directory è il modello in cui determinate attività critiche vengono eseguite da un unico DC designato alla volta, per evitare conflitti di aggiornamento che non potrebbero essere gestiti dalla normale replica multi-master.
root@urania:~# samba-tool fsmo show
SchemaMasterRole owner: CN=NTDS Settings,CN=CABRINI,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=intranet,DC=lan
...
Nel nostro caso tutti e sette i ruoli (SchemaMaster, InfrastructureMaster, RidAllocationMaster, PdcEmulationMaster, DomainNamingMaster, DomainDnsZonesMaster, ForestDnsZonesMaster) risultano assegnati a CABRINI. Tutto a posto: urania non è il proprietario e si può rimuovere senza problemi.
Nota. Se il DC da rimuovere possedesse uno o più ruoli, prima vanno trasferiti a un altro DC, per esempio con samba-tool fsmo transfer --role=all -U administrator eseguito sul DC che li deve ricevere.
La rimozione si fa sul DC da togliere:
root@urania:~# samba-tool domain demote -Uadministrator
Using tedeschi.intranet.lan as partner server for the demotion
Password for [INTRANET\administrator]:
Deactivating inbound replication
Asking partner server tedeschi.intranet.lan to synchronize from us
Changing userControl and container
...
Demote successful
L’output completo è nel riquadro «Log completo» in fondo a questa pagina. Dopo la rimozione è buona norma applicare sui DC restanti:
samba-tool dbcheck --cross-ncs --fix
in modo da pulire il database. È anche utile verificare che i riferimenti al DC rimosso siano stati tolti dal DNS. Infine, sul DC che esegue la replica di SYSVOL vanno tolti il profilo Unison e la riga di crontab relativi al DC rimosso.
Log completo – Output completo del comando demote (le righe «forestFunctionality not setup» sono avvertimenti attesi)
root@urania:~# samba-tool domain demote -Uadministrator
Using tedeschi.intranet.lan as partner server for the demotion
Password for [INTRANET\administrator]:
Deactivating inbound replication
Asking partner server tedeschi.intranet.lan to synchronize from us
Changing userControl and container
INFO 2026-10-06 10:46:37,137 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #60: Removing Sysvol reference: CN=URANIA,CN=Enterprise,CN=Microsoft System Volumes,CN=System,CN=Configuration,DC=intranet,DC=lan
INFO 2026-10-06 10:46:37,145 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #60: Removing Sysvol reference: CN=URANIA,CN=intranet.lan,CN=Microsoft System Volumes,CN=System,CN=Configuration,DC=intranet,DC=lan
INFO 2026-10-06 10:46:37,147 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #88: Removing Sysvol reference: CN=URANIA,CN=Domain System Volumes (SYSVOL share),CN=File Replication Service,CN=System,DC=intranet,DC=lan
INFO 2026-10-06 10:46:37,149 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #88: Removing Sysvol reference: CN=URANIA,CN=Topology,CN=Domain System Volume,CN=DFSR-GlobalSettings,CN=System,DC=intranet,DC=lan
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,191 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #171: updating ForestDnsZones.intranet.lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,212 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #171: updating DomainDnsZones.intranet.lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,241 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #171: updating intranet.lan keeping 6 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,296 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp.ForestDnsZones,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,312 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp.Default-First-Site-Name._sites.ForestDnsZones,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,328 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=@,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 5 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,343 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,359 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_kerberos._udp,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,375 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_kpasswd._tcp,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,391 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_gc._tcp,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,407 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_kpasswd._udp,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,423 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp.Default-First-Site-Name._sites,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,438 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_gc._tcp.Default-First-Site-Name._sites,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,454 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp.DomainDnsZones,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,471 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_kerberos._tcp,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,489 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp.Default-First-Site-Name._sites.DomainDnsZones,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,505 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_kerberos._tcp.Default-First-Site-Name._sites,DC=intranet.lan,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,525 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_kerberos._tcp.dc,DC=_msdcs.intranet.lan,CN=MicrosoftDNS,DC=ForestDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,541 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp.dc,DC=_msdcs.intranet.lan,CN=MicrosoftDNS,DC=ForestDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,555 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=c107340f-e906-4ad0-aa00-fc78245ad409,DC=_msdcs.intranet.lan,CN=MicrosoftDNS,DC=ForestDnsZones,DC=intranet,DC=lan keeping 0 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,570 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp.Default-First-Site-Name._sites.gc,DC=_msdcs.intranet.lan,CN=MicrosoftDNS,DC=ForestDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,586 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=@,DC=_msdcs.intranet.lan,CN=MicrosoftDNS,DC=ForestDnsZones,DC=intranet,DC=lan keeping 3 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,602 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_kerberos._tcp.Default-First-Site-Name._sites.dc,DC=_msdcs.intranet.lan,CN=MicrosoftDNS,DC=ForestDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,618 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp.gc,DC=_msdcs.intranet.lan,CN=MicrosoftDNS,DC=ForestDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,633 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp.44160df6-8f9d-486a-94ed-5673876fdf8f.domains,DC=_msdcs.intranet.lan,CN=MicrosoftDNS,DC=ForestDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
INFO 2026-10-06 10:46:37,649 pid:1696 /usr/lib/python3/dist-packages/samba/remove_dc.py #212: updating DC=_ldap._tcp.Default-First-Site-Name._sites.dc,DC=_msdcs.intranet.lan,CN=MicrosoftDNS,DC=ForestDnsZones,DC=intranet,DC=lan keeping 2 values, removing 1 values
source4/dsdb/common/util.c:4155: WARNING: forestFunctionality not setup
Demote successful
Categorised as: Linux | samba | Work
Comments are disabled on this post