WIN8 system Hosts file invalidation how to solve

Source: Internet
Author: User

First, the fault description

1, for everyone to do a demo test, please look at the following figure:

2, the visible Hosts file path is right, and only one line mapping to ensure that there are no other interference items.

3, using Ipconfig/flushdns to clean up the DNS cache, and in fact, I also stopped the DNS Client service. Then continue the ping and still return the address of the real DNS resolution.

Second, the cause of the failure

Visible the system's permissions are also assigned. The following is my own account and the Admin group's account permissions are fully controlled.

Third, the solution

1, edit etc folder access rights, add Network Service security principals and give permission to read at least, and then restart the DNS Client service. At present, my hosts have been all normal.

2, press win+ x key, click "Command Prompt (Admin)", and then enter the following command to press ENTER (enter) to execute:

SC Stop DnsCache

SC config dnscache obj= "NT authoritynetworkservice"

takeown/f "%windir%system32driversetc"/A

Icacls "%windir%system32driversetc"/grant "NT authoritynetworkservice": RX

SC start DnsCache

Command explanation:

Stop DnsCache (DNS Client) service

Configure the security principals running the DnsCache service as network services

Give the ETC folder ownership to the Administrators group

Add read and execute access to the ETC folder for the Network service

Start the DnsCache service

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.