General discussion


Change the Domain name

By roy ·
Can anyone point me in the right direction of a suitable tool for changing the domain name on a W2K DC? Is this a simple process, or do I have to rebuild the server. We only have the one server but it hosts 300 users and I don't want to rebuild unless its necessary. Cheers peeps.


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by TechKid In reply to Change the Domain name

Can only change domain name with Windows 2003. Sorry, but you'll have to reinstall

Collapse -

by timwalsh In reply to Change the Domain name

You cannot change the domain name in a Win2K AD domain.

You don't need to reinstall the software, but you do need to destroy your domain (run dcpromo) and recreate it from scratch (run dcpromo again changing the domain name).

You can make use of the "net user" command so you don't have to recreate all the user accounts individually.

Before destroying you present domain, from your DC run the command "net user > c:\user.txt" from the DOS prompt.

net user - shows the list of user accounts existing on the local computer

> redirects the output from the screen to either a printer or a text file.

c:\user.txt - denotes the path and file name you want the output redirected to.

Parse the resulting file using a text editor (like Notepad) and delete all the "fluff" (all automatically created accounts and all text before and after the list of user account) so that all that is left are the actual user accounts you will want to create on the new domain. Further edit the file so that you end up with a single column list of account names.

Now comes the fun part - modify each line in your text file so it uses the following syntax:

net user username password /add

(NOTE: 300 user accounts = 300 lines with that syntax)


username is the account name (all one word; no spaces)

password is a default initial password you want to set for each user account (NOTE: This is somewhat of a security breach in that you will have a file with all user account passwords in clear text. You can get around this somewhat by using an * in place of the password. This will cause the command to prompt you to enter a password as it runs each line.)

Collapse -

by timwalsh In reply to

Once you finished editing all lines in the file, rename the file to use a .bat extension instead of the .txt extension. Once you have created your new domain, fom a DOS prompt, run the .bat file to create your user accounts. You will receive confirmation as each line is completed succesfully.

This is a somewhat long way around, and you will still need to flag each account to force a password change at next log-on. But at least you don't have to manually recreate (in total) a large number of accounts.

From the DOS prompt, us the command "net help user", to see other options you can use with the net user command.

Good luck.

Collapse -

by jantoluv In reply to Change the Domain name

300 users is quite a lot of users.
Why didn't you plan this the first thing good because a name in the win2000 svr is very important.
anyway....maybe another way around.

do you have a additional domain cotroller?
if yes
do the dcpromo thing mentioned in the answer before.
change the name and do the dcpromo again.
if this proces is finished, synchronize the domain again....and promote the newly server as the new domain controller again.

Related Discussions

Related Forums