[Answered] hosts File

Discussion in 'Windows 10' started by solo_voyager, Feb 12, 2021.

  1. solo_voyager

    solo_voyager MDL Junior Member

    Aug 5, 2009
    58
    13
    0
    Just tried to access my hosts file to make some changes.
    First thing I notice is that there are a huge number of new entries to the file.
    Many of these entries are locations I have not been able to make contact with for a long time.
    I tried to add an entry.
    I am stopped being told that I do not have permission.

    I am the administrator for this PC.
    I should have access to anything and everything.
    I tried to remove all the new entries and am stopped.
    Again saying that I do not have access.

    I play some games, then I'm able to make some changes, but then I'm told that the file is in use and I can't make any changes, same game just different rules.

    I do some more checking and find that I'll probably be able to make changes in Safe Mode.
    Little doubt that will work, but what is going on here?
    Why has the hosts file suddenly become so difficult to work with?
    Can I fix it and get it back to working like it used to?
     
  2. endbase

    endbase MDL Guru

    Aug 12, 2012
    4,673
    1,708
    150
    Just copy teh host file to the desktop modify it and copy back and overwrite easy solution if it still works
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. solo_voyager

    solo_voyager MDL Junior Member

    Aug 5, 2009
    58
    13
    0
    HostsMan also cannot make any changes.
    The file being in use is the same reason given.
    @endbase
    Yeah, I've seen that one too.
    But if it does work, it's still simply just a workaround.
    It doesn't fix the problem.
    HostsMan's trouble leads me to believe that you're suggestion will probably work just as well.
    Someone or something is messing with my PC, trying to control my usage of it.
    I don't like it and want it stopped.
     
  4. solo_voyager

    solo_voyager MDL Junior Member

    Aug 5, 2009
    58
    13
    0
    What you folks don't seem to realize is that as long as the file is locked because another process is using it, it is locked even to an administrator.
    The only way around it I can see is in safe Mode while that process has not been activated yet.
    That doesn't fix the problem.
    We're still only talking workarounds.
     
  5. endbase

    endbase MDL Guru

    Aug 12, 2012
    4,673
    1,708
    150
    What is causing the host file to be in use I never had that problem to be honest are you using thirth party program that uses the host file?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,351
    2,308
    60
    #7 drew84, Feb 12, 2021
    Last edited: Feb 12, 2021
    ... sure your host file hasn't by chance been made read only

    some Anti Virus/Firewalls software (like Zone Alarm) also lock the host file by default, needs to be unchecked in settings
     
  7. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,246
    94,631
    450
  8. EXO56

    EXO56 MDL Member

    Mar 22, 2013
    183
    250
    10
    #9 EXO56, Feb 12, 2021
    Last edited: Feb 12, 2021
    ...
    (removed because not understood by some addicted case sensitive noobs!)
     
  9. case-sensitive

    case-sensitive MDL Expert

    Nov 7, 2013
    1,681
    729
    60
    JFC Theres some crass ' Answers ' here .

    2 problems = Whats adding things to the host file and whats blocking it .

    Look at your anti virus and firewall and see if its being blocked . For example zonealarm does it .

    When did your problem start ?

    Have you got a back up from before it started ? If not why not :)

    Which IPs are being blocked ?

    Some keygens add things to the hosts file .

    Did you do malware scans ?
     
  10. TubFarter

    TubFarter MDL Novice

    May 18, 2017
    29
    8
    0
    No it's not. I can open mine in notepad++, type any thing I want, click to save it and it will prompt me to open Notepad++ as administrator and still have the changes I made shown. I then click save and that's it. I can then open it with regular Notepad and it will show said changes.

    So there's something else going on if you cannot open/edit/save it with a text editor as administrator.
     
  11. sml156

    sml156 MDL Member

    Sep 8, 2009
    196
    115
    10
    I edit my hosts file all the time -- just use notepad++ and save it then notepad++ asks if you want to switch to adimin when it restarts save it again done now get on with your day
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. EXO56

    EXO56 MDL Member

    Mar 22, 2013
    183
    250
    10
    Yeah indeed "theres some crass answers here"!!!
    Blocking or adding/redirecting/resolving hostnames is the same approach!
     
  13. sml156

    sml156 MDL Member

    Sep 8, 2009
    196
    115
    10
    Copy paste your hosts file to this forum let us look at it, If it's malicious we will tell you
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. case-sensitive

    case-sensitive MDL Expert

    Nov 7, 2013
    1,681
    729
    60
    He already knows that its maliceous because he didnt change it and he cant change it .

    The best idea so far came from Drew84

    @ Problem ......... Time it :) = How long you spend trying to sort the problem out ............. against how long it would take to delete your system and reinstall it .
     
  15. ohenry

    ohenry MDL Senior Member

    Aug 10, 2009
    423
    252
    10
    I have had similar problems with trying to change the HOSTS file. A couple of things that might help. From a command prompt,

    attrib -R c:\windows\system32\drivers\etc\HOSTS

    Try making a copy somewhere else, edit the copy, and then use File Explorer to copy the edited file back to the original location.

    If all else fails, reboot. I have found several times that immediately after a reboot I can accomplish things that simply would not work before.

    A friend of mine, one of the best unix admins I have ever had the pleasure of working with, told me once that he wanted to put an icon on all of the companies PCs (approximately 50k Windows desktops worldwide). The icon would be labeled, "FIX ALL PROBLEMS", and would simply reboot the PC.
     
  16. solo_voyager

    solo_voyager MDL Junior Member

    Aug 5, 2009
    58
    13
    0
    #18 solo_voyager, Feb 12, 2021
    Last edited: Feb 12, 2021
    (OP)
    I have found that many if not almost all the entries in my hosts file are variations of Pirate Bay URLs.
    There are hundreds of them listed on there.
    I've never heard of most of them before.
    I am blocked from making any additions or deletions by its being accessed by another process.

    As I remember, there was the hosts file and maybe a couples of other files in the etc folder.
    Now there are a number of new files in there: hosts.backup, hosts.check, Imhosts, Imhosts.sam, as well as what I think were the original files: hosts, networks, protocol, and services.

    it's beginning to look to me as if someone is trying to control where I go online,
    Nobody has that right, except me..

    EDIT:
    I had to add " .txt " to the file to get it to show in Explorer.
     

    Attached Files:

  17. solo_voyager

    solo_voyager MDL Junior Member

    Aug 5, 2009
    58
    13
    0
    I had d/l'd sysinternals last night.
    I got a huge, very long list where it was very difficult just to find one entry that did seem to point to the hosts file.,
    That was Explorer there may have been more but it looked to be difficult and time consuming to nail anything down.
    So, I put it down.
     
  18. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,351
    2,308
    60
    #20 drew84, Feb 12, 2021
    Last edited: Feb 12, 2021