• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1638
  • Last Modified:

Multiple Host Names (Win2k server)

How can I setup an a server to have 2 host names.
I would like to be able to communicate to 1 server using 2 different names.
i.e. \\servername1\c$   OR   \\servername2\c$

I recently migrated to a new server but there are old applications hard coded to the old servername.

I have read that it is possible but am unable to find out how to do it.

Need help ASAP!

thanks in advance.
B.J. Davis
B.J. Davis
  • 4
  • 3
  • 2
1 Solution
if you have an internal DNS server, you can add 'CNAME' (alias) DNS records for the server, or, if you have a WINS server you can add multiple static names for the server's IP address.

Or, you can modify every machines HOSTS file to look like this:

x.x.x.x   oldname  newname

substituting in the ip address and server names
B.J. DavisAuthor Commented:
I added the DNS CNAME ... no luck
add Static WINS ... no luck
I have even tried DNS HOST entry ... no luck

I get an error message "Windows cannot find "\\servername2\c$".

If i remove the DNS entries I get an error message "Duplicate name Found"

Gee Whizzzzzzzzz...

Ok, let's back up...

you have a DNS server...and your PC is configured as a client of that DNS server.
on that DNS server you have a forward-lookup zone for your domain
now, you create a host (A) record for the server using newname and the servers IP address
test with 'ping newname' to see that it works.
(also try 'ping newname.domain.com' in case it's a problem where your PC's domain name is different)
next, add an alias record called 'oldname' and then point it to newname.domain.com
test with 'ping oldname' to see that it works

pls. if this doesn't work, let me know where the failure happened so we can figure it out

WINS (might be better for clients < win2000)
you have a WINS server, and your PC is configured as a client of that WINS server
the server is also configured as a client of the WINS server
when you open WINS Manager, and view active registrations, you see the 'newserver' name registered in there
Now, in WINS manager, choose to add new static entry, use the name 'oldname' and the address of the server
'ping newname'
'ping oldname'
should both work...

assuming that ping is working, try mapping with a command line:
net use \\oldname\sharename

let me know what's working and what's not!

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

B.J. DavisAuthor Commented:
OK Pinging
.. servername2.domain.com
.. servername

net use \\servername2\c$
i get the message
"You were not connected because a duplicate name exists on the network. Go to the system in Control Panel to change the computer name and try again."

Click on start > run > type in

I get the message
"You were not connected because a duplicate name exists on the network. Go to the system in Control Panel to change the computer name and try again."

currently I have this

servername1        (HOSTA)       
servername2        alias(CNAME)            servername1.domain.net


servername2 (static)



that's weird....what we've done doesn't produce duplicate names...

is that the same error you were getting before setting up DNS and WINS?

try this:
check in WINS to see if there was a dynamically registered entry for 'newname' that was already there when we added the static entry
B.J. DavisAuthor Commented:
No there are only 3 entries in WINS

Record Name     Type
servername2     [03h] Messenger
servername2     [00h] Workstation
servername2     [20h] File Server


It is driving me nuts.
Anyway it is 6:00 pm and I am going home. I am peddeling on my last leg ( 32 straight hours at work ).

I will be back tomorrow.( What am I thinking ??? )

Later and thank you for the help it is greatly appreciated and needed.
Talk to you tomorrow.


Stop...stop.   WINS/DNS is not the answer!   Sure, it will resolve the names correctly, but it will not allow a UNC-style connection to occur

The answer is to edit the registry to add on Optional Name, similar to the way cluster services works.

login with an account with administrator rights, and use REGEDT32 (not the normal REGEDIT!) to navigate to the following location in the registry.


Create a Multi-String (REG_MULTI_SZ) value called "OptionalNames".  Add the new aliases (as many as you'd like, each on a separate line)


The only (very) minor down side to this is, when you go to My Network Places, you'll see both names (and could get confusing if you weren't aware that they were in fact, the same machine).
...in fact, I have a suite of applications that we developed that is designed to run in the login batch file of the client PCs.  It will lookup a list of "before" and "after" server names, and do a "search and replace" on the client PC to edit the registry, shortcut files, and specific text files.  No more broken shortcuts, and missing install points.

Sure makes renaming servers easy.... in fact, most users are completely unaware that we've renamed a bunch of servers (other than the 30 seconds extra it took to log in that one time).

My FTP server is down for a while, so if you're interested, let me know and I'll email you the stuff (or figure some other way to get it to you).
Here is the Readme file from the project (This write up is a bit specific to my place of work, but you'll get the point)

The Renaming Project

As you are probably aware, whenever a server is renamed, it causes problems with all of the client PCs that use those resources.  The file and print shares on those client PCs will become "orphans" requiring a lot of tech support time to re-attach shares and shortcuts to the new server names.  To compound the problem, file and print shares and shortcuts are stored on a "per user" basis, so if a single PC is shared by 5 people, then tech support personnel might be called to reattach resources 5 different times for the same PC.  Also, since print shares are not typically centrally managed, if a user asks for help due to a broken print share, the technician might not know the correct (new) name for the PC.  There are additional behind-the-scenes orphans that are created in the registry that can come back to haunt you for years to come.


The solution to the problem is in three parts:

1) Create a database of "old" vs. "new" PC names.  This list can be created by each organization to include all of their existing PCs and servers and the corresponding new names for each.  We have a tool called "NetList2" to assist in recording all existing PCs and identify those with file and print services.

2) Create a naming "overlap”.  This overlap creates a situation where both the new server name and the old server name are operational at the same time.  This step gives you time to plan and implement the remainder of the renaming process.  The naming overlap allows you to do a phased approach where some portion of your client PCs can be re-attached to the new share names, while others are still using the old share names.  The overlap could be in place as long as it takes to complete the process (several weeks typically).  Local system administrators can perform the naming overlap with a simple registry change, without the need for assistance from DOIM.  After all client PCs are renamed and resources re-attached, then the overlap can be removed.

3) Automate the renaming of client PCs.  We have a tool called "ReNamePCs" to perform the following functions.  First, the program can automatically rename each PC without user intervention.  Second, the program will search the registry for all references to a list of old server names, and replace each occurrence with the new server name.  The registry entries for every user on that PC is also subject to this search and replace procedure.  Third, it searches the entire hard drive for shortcuts and edits the shortcut properties to point to the new server’s names.  Lastly, it edits specifically-listed text files on the hard drive doing a "search and replace" based upon the new server names. The program is designed to run in the login batch file, and takes about a minute to run.  It only needs to run once in the life of a PC, so the 1-minute login delay is not that significant.

We have another tool called “RemoteRename” which lacks the re-attachment functionality of ReNamePCs, but will allow an administrator to remotely rename PCs over the network.

With this procedure in place, your users will probably not even be aware that their PC has been renamed, nor that other network file and print servers that they use have been renamed.  All of the user's orphaned mapped drives, shortcuts, software settings, software install locations, etc. will be automagically re-attached using the new server names.

* The program is written in VB.Net so it will require the .Net Framework to be installed on each PC (if used in a login batch scenario)
* If run from a network share, .Net Framework security will require some adjustments
* The program requires local administrator rights
* To use the auto-rename feature, the encrypted credentials are placed in the config file
Since not all users are administrators on their PC and not all PCs have the .Net framework installed, the idea of running this program in the login batch file might not work outside of the DPW.  However, even if run manually by a team of "roving administrators", it will cut deployment and support time dramatically.  (The program and database are small enough to fit on a floppy)

Software Summary:

The ReNamePCs program is available in VB.Net source-code format to make it easy for others to modify the program. The program is normally configured via an XML-based configuration file and by tables in its database.  Recompiling the program will not normally be required.

When run, the program will record everything it does into a log file.  The output of the log file can be used to verify successful operation or as a means to recover from errors.

The ReNamePCs program consists of these parts:
      ReNamePCs.exe            the executable program
      ReNamePCs.exe.config      XML configuration file (edit to suit your needs)
      ReNamePCs.mdb            the Access database file
      ReNameEncrypt.exe      program to create encrypted credentials for the configuration file
      RemoteRename.exe      program to rename PCs over the network

The ReNamePCs database consists of:
      RenameList      table of "before" and "after" PC names
      Files            files to look at (wildcards are supported in the name portion)
      HKLM            starting HKEY_LOCAL_MACHINE registry keys to look at
      HKLM_Binary      starting HKLM registry keys to look at for binary values
      HKU            starting HKEY_USERS registry keys to look at
      HKU_Binary      starting HKU registry keys to look at for binary values

The NetList2 program is available in VB6 source-code format and can be easily modified if required. When run, the program will create a database to store its results. The NetList2 program consists of just the NetList2.exe executable program.
Task List:

1) Collect a list of existing PCs, identifying those with file or print services.  Use the NetList2 program to collect "Resource Scope" data on PCs in your domain into an Access database.  If your PCs are in the HOOD domain, then you will obviously get a lot more entries than just your PCs and you might need to weed out the extraneous entries.  Use the output of the program to build the "RenameList" table in the ReNamePCs.mdb database.

Next you must manually populate the "after" fields for the table, using the current DOIM guidance for the new naming convention.

2) Create aliases for each server.  On each server (and ordinary PCs with print services, if required), login with an account with administrator rights, and use REGEDT32 (not the normal REGEDIT!) to navigate to the following location in the registry.


Create a Multi-String (REG_MULTI_SZ) value called "OptionalNames".  The data for this new value should be the current PC name on one line and the new PC name on a second line.  After a reboot, the Server/PC will show up on the "My Network Places" under both its old name and its new name.

3) Perform a test run and configure the ReNamePCs program.  The program can be configured via the ReNamePCs.exe.config file to run in a test mode.  You can use the program's log file to verify that all of your registry locations, shortcuts, and file locations are being searched by the program.  You can adjust the tables in the ReNamePCs.mdb to add customized search locations to suit your needs.

If you plan to use the auto-rename feature, you must run another application called "ReNameEncrypt" to encrypt user name and password that you intend to use inside the ReNamePCs program.  The cipher text output is placed in the ReNamePCs.exe.config file.  The user account used for this purpose should be an ordinary domain user account that has been granted "Add machines to the domain" rights.  As a security safeguard, this account’s password should be changed after the renaming project is complete.

4) Run the ReNamePCs program on each client PC.  This can be done via a login batch file if you are certain that the client PCs have the .Net framework installed, the .Net framework security has been configured, and the users are administrators on their own PCs.

If these criteria are not met, then a team of “roving administrators” can visit each PC, install the .Net framework (if needed), and run the program from a network share or floppy disk.  The program requires no user intervention and can be easily run by inexperienced users (provided they have local administrator rights).

5) Rename the Servers and PCs.  The RenamePCs program can optionally be configured to perform this step for you, you can use the RemoteRename program to perform this step over the network, or you can have an administrator visit each PC and perform this step manually.  A reboot is required before the new name goes into effect.  PCs with aliases will continue to be available via their old names.

Note: If you already plan to have an administrator visit each PC, there is no need to use the auto-rename feature (it was designed for use in the unattended login batch file scenario).

6) Remove the aliases.  After all client PCs and servers have been renamed, go back and visit each aliased PC and remove the registry value used in step 2.  A reboot is required.


The DPW systems team is available to demonstrate the entire process.  The programs, documentation, and sample database is available on CDROM.  We can also assist you in configuring the programs, collecting the required database items, and by giving instructions to your administrators.  We can also make software changes to customize the programs (such as creating unique encryption keys) for each organization.

Other programs (unrelated to the renaming project) that might be of interest to system administrators:

      DisableX      Prevents users from terminating login batch console windows
      FS_Dump            Record file details of every file on a server into a database
      List_ACLs      Record security permissions on every file/directory on a server into a database
      LogoffAll      Force the logoff of all PCs on the network (with exceptions)
      MBSA_Logs      Collect Microsoft Baseline Security Analysis (MBSA) logs into a database
      NortonAlert      Get real-time notification of virus activity on all PCs on the network
      ReBootAll      Force the reboot of all PCs on the network (with exceptions)
      RePass            Rename the local Admin account and change the password via a login batch file
      ScheduledReboot      Schedule the orderly reboot of a list of servers
      ShutdownAll      Force the shutdown of all PCs on the network (with exceptions)
      SOSOS            Collect and maintain 182 pieces of information on all PCs into a database

Contact the DPW systems team for additional information about the availability of other programs mentioned here.  Most of these programs are available via anonymous FTP from ftp://ftp.dpw.hood.army.mil/Programs.
B.J. DavisAuthor Commented:
Thanks for all your help it was VERY HELPFULL!


B.J. Davis
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now