Windows Server TechCenter > Windows Server Forums > General > Windows Server 2003 64 Bit no effect of changing the hosts file
Ask a questionAsk a question
 

AnswerWindows Server 2003 64 Bit no effect of changing the hosts file

  • Thursday, October 08, 2009 3:58 AMDirkZP Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    I'm using windows server 2003 64 Bit. I want to add a new entry in the hosts file (windows\system32\drivers\etc\). It takes no effect. I'm using the notepad editor.
    The registry entry is correct to this path. Has anybody an idea?
    Thanks a lot.

    Grettings,
    Dirk

Answers

  • Thursday, October 08, 2009 6:14 AMSainath IRP_MJ_CREATEMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi there,

    thanks for the info, once you enter the above info into the host file, this data will get added to dns resolver cache, so you might want to flush and resgister the dns client service.

    please do perform

    ipconfig /flushdns

    ipconfig /registerdns

    and you can check if the entry is added using ipconfig /displaydns command.


    or other way is to just to restart the DNS client service which should be done only if you do not have any application using the dns name resolution.


    sainath !analyze
  • Wednesday, November 04, 2009 8:24 AMDirkZP Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello,

    thanks for your help. But I found an easy solution.
    Just delete the old host file and make a new one.
    It is working. Strange.

    Dirk

All Replies

  • Thursday, October 08, 2009 5:19 AMSainath IRP_MJ_CREATEMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi DirkZP,

    Thank you for posting in windows server forums,

    can you please provide the syntax you are using , please remember that entering IPaddress into host files are not valid.


    sainath !analyze
  • Thursday, October 08, 2009 5:22 AMRajnish R Sharma Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Normally the DNS service should run under the network service and this network service should have rights on the host file. Can you check this and let us know.


    Raj
  • Thursday, October 08, 2009 5:51 AMDirkZP Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    thanks for this fast reply.

    So I add the 2nd row to the hostfile:
    127.0.0.1          localhost
    192.168.178.2   dbserver

    The server is not in a Domain, only Workgroup. How can I check your statement, Raj?

    Thanks,
    Dirk
  • Thursday, October 08, 2009 6:14 AMSainath IRP_MJ_CREATEMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi there,

    thanks for the info, once you enter the above info into the host file, this data will get added to dns resolver cache, so you might want to flush and resgister the dns client service.

    please do perform

    ipconfig /flushdns

    ipconfig /registerdns

    and you can check if the entry is added using ipconfig /displaydns command.


    or other way is to just to restart the DNS client service which should be done only if you do not have any application using the dns name resolution.


    sainath !analyze
  • Thursday, October 08, 2009 6:21 AMRajnish R Sharma Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Can you check the permission on the security tab of the file. Also can you rename the host file after copying the contents from there and try creating another txt file and paste all the content in the new txt file.

    Also run flushdns and resgiter dns after editing the txt file.
    Raj
  • Wednesday, November 04, 2009 8:24 AMDirkZP Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello,

    thanks for your help. But I found an easy solution.
    Just delete the old host file and make a new one.
    It is working. Strange.

    Dirk