Quentin Gibeaux
2014-Aug-22 07:45 UTC
[Samba] Change hostname of the main domain controller of the Active Directory
Hi, With Samba4 and Active Directory the hostname of the server is read during provision, to set the netbios name. It's even asked to set /etc/hostname and /etc/hosts in respect with the chosen domain/realm names. I've seen that on real windows AD that it's possible to change the hostname of the domain controller with netdom command, but is there a way to do so on Samba4 ? The netbios name seems to be referenced in several locations : * in smb.conf * in the ldb : o msSFU30MasterServerName in some entries located in CN=ypServ30,CN=RpcServices,CN=System o user's profilePath o it's own domain controller entry located in CN=$NETBIOS,OU=Domain Controllers,DC=... o it's RID entry : CN=RID Set,CN=$NETBIOS,OU=Domain Controllers,DC=... o fSMORoleOwner in CN=RID Manager$,CN=System,DC=... and in CN=Infrastructure,DC=... o the user dns-$NETBIOS o fSMORoleOwner msDs-masteredBy msDS-IsDomainFor masteredBy in DC=... entry Any clue to update the server's hostname ? Thanks, Quentin Gibeaux.
Marc Muehlfeld
2014-Aug-22 15:34 UTC
[Samba] Change hostname of the main domain controller of the Active Directory
Hello Quentin, Am 22.08.2014 09:45, schrieb Quentin Gibeaux:> With Samba4 and Active Directory the hostname of the server is read > during provision, to set the netbios name. It's even asked to set > /etc/hostname and /etc/hosts in respect with the chosen domain/realm names. > > I've seen that on real windows AD that it's possible to change the > hostname of the domain controller with netdom command, but is there a > way to do so on Samba4 ? > The netbios name seems to be referenced in several locations : > > * in smb.conf > * in the ldb : > o msSFU30MasterServerName in some entries located in > CN=ypServ30,CN=RpcServices,CN=System > o user's profilePath > o it's own domain controller entry located in > CN=$NETBIOS,OU=Domain Controllers,DC=... > o it's RID entry : CN=RID Set,CN=$NETBIOS,OU=Domain Controllers,DC=... > o fSMORoleOwner in CN=RID Manager$,CN=System,DC=... and in > CN=Infrastructure,DC=... > o the user dns-$NETBIOS > o fSMORoleOwner msDs-masteredBy msDS-IsDomainFor masteredBy in > DC=... entry > > Any clue to update the server's hostname ?Don't do the renaming manually inside the databases! You will corrupt your AD! Use # source4/scripting/bin/renamedc and set the new name in your smb.conf But I suggest a test in a save environment first. Regards, Marc