How can the NETBIOS domain name be changed?

servicesforwindows
takeover
netbios
ucs4
winbind

#1

In a UCS domain with Samba 4 (Active Directory Domain Services) the following steps are required in order to change the NETBIOS domain name. In this example the NETBIOS domain name is changed from DOM to NEWDOM. The values have to be adapted to your environment:

####1. First of all, the Samba domain objects must be changed on the UCS Domain controller master:

eval "$(ucr shell)"
udm settings/sambadomain modify --dn sambaDomainName=DOM,cn=samba,$ldap_base --set name=NEWDOM

####2. On every Samba 4 Domain Controller the following commands have to be executed:

eval "$(ucr shell)"
ldbmodify -H /var/lib/samba/private/sam.ldb.d/CN=CONFIGURATION,$samba4_ldap_base.ldb <<-%EOF
dn: CN=DOM,CN=Partitions,CN=Configuration,$samba4_ldap_base
changetype: modify
replace: nETBIOSName
nETBIOSName: NEWDOM
%EOF

ldbrename -H /var/lib/samba/private/secrets.ldb "flatname=DOM,cn=Primary Domains" "flatname=NEWDOM,cn=Primary Domains"

####3. Afterwards , the NETBIOS domain name must be changed in the configuration files on every Samba domain controller. Please use /etc/init.d/samba-ad-dc instead of /etc/init.d/samba on UCS 3 systems:

ucr set windows/domain=NEWDOM
/etc/init.d/samba restart

####4. If UCS member servers are used with Samba services, the following commands should be run on every UCS member server:

ucr set windows/domain=NEWDOM
net ads join -U Administrator
/etc/init.d/samba restart
/etc/init.d/winbind restart

AD Anbindung - Das Passwort des UCS-Administrators konnte nicht auf das des Active Directory-Administrators gesetzt werden