Microsoft KB Archive/169741
Article ID: 169741
Article Last Modified on 11/1/2006
- Microsoft Windows NT Workstation 4.0 Developer Edition
- Microsoft Windows NT Server 4.0 Standard Edition
This article was previously published under Q169741
Renaming a domain name is a complex operation and requires modifications on all domain controllers and on all domain members (servers and workstations).
The procedure described below can help an administrator rename a domain on the PDC and modify the domain configurations of the BDCs and workstations from the command line or within a batch file.
CAUTION: The procedure described in this article has not been extensively tested in large installations. Microsoft cannot guarantee that modification of domains as recommended herein will accomplish the objective described in this article under all circumstances and in all configurations.
If you want to rename a domain name from OLDDOMAINNAME to NEWDOMAINNAME, perform the following operations:
- Rename the domain on the primary domain controller (PDC) and restart the computer.
- On all backup domain controllers (BDCs), use the Network tool in Control Panel to rename the domain and restart the computer.
- On all members (that is, workstation and stand-alone server members), leave the domain and then rejoin the domain.
- Rebuild all trust relationships.
Domain information is stored in the Local Security Authority (LSA). The LSA contains both the domain name and the domain SID. Renaming a domain does not change the domain SID, so the LSA primary domain name must be changed. This can be achieved with the use of NETDOM utility that is included in Windows NT 4.0 Server Resource Kit Supplement 2.
All the operations below may take place on the PDC. Perform the following steps to rename a domain:
- Rename the domain on the PDC and restart the computer.
- For each BDC, run the following command at the command prompt and then restart the BDC:
NETDOM BDC \\BDCNAME /RENAMEDOMAIN NEWDOMAINNAME
The above command requires administrator privilege and can be run on the PDC itself.
WARNING: Renaming the BDC requires that you use Netdom 1.2a or later. The version of Netdom included in the Windows NT Server 4.0 Resource Kit Supplement 2 cannot be used to rename the domain name on a BDC.
- The above command requires administrator privilege and can be run on the PDC itself. After all domain controllers (for example, the PDC and all BDCs) have changed their domain name, the domain members may be modified.
For each member, run the following command at the command prompt:
NETDOM /DOMAIN:NEWDOMAINNAME MEMBER WorkstationName /JOINDOMAIN
The above command may be started on any domain controller provided that you have administrator access to the workstation. For example, you may run the following command before running NETDOM, provided that all connections to \\WORKSTATIONNAME are closed:
NET USE \\WORKSTATIONNAME\IPC$ /USER:WORKSTATIONNAME\ADMINISTRATOR Password
NOTE: The above command is one path; it has been wrapped for readability. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
150493 How to join a domain from the command line
- The above command requires administrator privilege and can be run on the PDC itself. For each trusted (master) domain, type the following command:
NETDOM /DOMAIN:NEWDOMAINNAME MASTER TrustedDomain /DELETE
NETDOM /DOMAIN:NEWDOMAINNAME MASTER TrustedDomain /TRUST [password]
The password is optional and, if it is not provided along with the command, NETDOM will pick up a default password on behalf of the user.
- The above command requires administrator privilege and can be run on the PDC itself. For each trusting (resource) domain, type the following command:
NETDOM /DOMAIN:TrustingDomain MASTER NEWDOMAINNAME /TRUST [password]
(The password is optional).The above command can be run on any member or domain controller (DC) of the NEWDOMAINNAME domain, provided that you have administrator access to the PDC of the trusting domain (resource domain).
All the steps described above can be included in a single batch file.
Additional query words: reskit re-name
Keywords: kbhowto KB169741