Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Administrator Can't Edit Hosts File

Reply
Thread Tools Display Modes

Administrator Can't Edit Hosts File

 
 
Boris
Guest
Posts: n/a

 
      10-08-2007
I'm running a new Vista machine, and as Administrator, I want to edit
my hosts file, but when I complete the edit and try to save, I get: "C:
\Windows\system32\drivers\etc\hosts was denied".

Here's the details:

When I set up the machine, I created only one account, ME, and a Guest
account was also created. If I go to the User Accounts panel, I see
that the only two accounts listed are, "ME-Administrator", and "Guest-
Turned off". So, I'm set up as the administrator.

If I do a "Properties" on the hosts file, and go to the "Security"
tab, I see three groups of users, who have the following permissions:

System-Full, Modify, Read and Execute, Read, Write
Administrator (VISTA_MACHINE\Administrators)-Full, Modify, Read and
Execute, Read, Write
Users (VISTA_MACHINE\Users)-Read and Execute, Read

According to the permissions that the system shows, above, I, as
Administrator, should be able to edit the hosts file. Why can't I?

Thanks.

 
Reply With Quote
 
 
 
 
JCS
Guest
Posts: n/a

 
      10-08-2007
You aren't THE Administrator. That account is hidden/disabled by default in
Vista. You could either enable THE Administrator account or you could go to
your notepad.exe shortcut, right-click, and select "Run as administrator".
You can do a search of these forums or on Google to find out how to enable
THE Administrator account so that it appears on the Welcome screen.

"Boris" <boris-> wrote in message
news: ups.com...
> I'm running a new Vista machine, and as Administrator, I want to edit
> my hosts file, but when I complete the edit and try to save, I get: "C:
> \Windows\system32\drivers\etc\hosts was denied".
>
> Here's the details:
>
> When I set up the machine, I created only one account, ME, and a Guest
> account was also created. If I go to the User Accounts panel, I see
> that the only two accounts listed are, "ME-Administrator", and "Guest-
> Turned off". So, I'm set up as the administrator.
>
> If I do a "Properties" on the hosts file, and go to the "Security"
> tab, I see three groups of users, who have the following permissions:
>
> System-Full, Modify, Read and Execute, Read, Write
> Administrator (VISTA_MACHINE\Administrators)-Full, Modify, Read and
> Execute, Read, Write
> Users (VISTA_MACHINE\Users)-Read and Execute, Read
>
> According to the permissions that the system shows, above, I, as
> Administrator, should be able to edit the hosts file. Why can't I?
>
> Thanks.
>


 
Reply With Quote
 
Boris
Guest
Posts: n/a

 
      10-08-2007
On Oct 8, 12:43 pm, "JCS" <sander...@gmail.com> wrote:
> You aren't THE Administrator. That account is hidden/disabled by default in
> Vista. You could either enable THE Administrator account or you could go to
> your notepad.exe shortcut, right-click, and select "Run as administrator".
> You can do a search of these forums or on Google to find out how to enable
> THE Administrator account so that it appears on the Welcome screen.
>
> "Boris" <boris-badeno...@excite.com> wrote in message
>
> news: ups.com...
>
>
>
> > I'm running a new Vista machine, and as Administrator, I want to edit
> > my hosts file, but when I complete the edit and try to save, I get: "C:
> > \Windows\system32\drivers\etc\hosts was denied".

>
> > Here's the details:

>
> > When I set up the machine, I created only one account, ME, and a Guest
> > account was also created. If I go to the User Accounts panel, I see
> > that the only two accounts listed are, "ME-Administrator", and "Guest-
> > Turned off". So, I'm set up as the administrator.

>
> > If I do a "Properties" on the hosts file, and go to the "Security"
> > tab, I see three groups of users, who have the following permissions:

>
> > System-Full, Modify, Read and Execute, Read, Write
> > Administrator (VISTA_MACHINE\Administrators)-Full, Modify, Read and
> > Execute, Read, Write
> > Users (VISTA_MACHINE\Users)-Read and Execute, Read

>
> > According to the permissions that the system shows, above, I, as
> > Administrator, should be able to edit the hosts file. Why can't I?

>
> > Thanks.- Hide quoted text -

>
> - Show quoted text -


So what you're saying is that I'm not REALLY the big cheese. OK.

I did some searching, and foud out how to enable the REAL
administrator account, but decided to do as you suggested, use Notepad
and "Run as administrator". It worked fine, except that I had to open
Notepad and navigate to the file itself. It's much easier to double
click the hosts file, and have Notepad open it. But your workaround
is just fine.

Question...Do I (ME-Administrator, as listed in the User Accounts
Panel), fall into the Users (VISTA_MACHINE\Users) category, as listed
in the security tab? If that is indeed ME in the Users group, will
enabling Full permissions (if Vista will allow that), or at least
write permission, let me then edit the hosts file as originally
planned?

Thanks again.

 
Reply With Quote
 
Rick Rogers
Guest
Posts: n/a

 
      10-08-2007
Hi Boris,

Even an admin account has to self-elevate to open and edit system files.
They would not be accessible under normal running mode. Click start and type
notepad, then right click the entry in the menu and select 'run as
administrator'. Then click file/open and navigate to the HOSTS file and
select it.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP
http://mvp.support.microsoft.com/
Windows help - www.rickrogers.org
My thoughts http://rick-mvp.blogspot.com

"Boris" <boris-> wrote in message
news: ups.com...
> I'm running a new Vista machine, and as Administrator, I want to edit
> my hosts file, but when I complete the edit and try to save, I get: "C:
> \Windows\system32\drivers\etc\hosts was denied".
>
> Here's the details:
>
> When I set up the machine, I created only one account, ME, and a Guest
> account was also created. If I go to the User Accounts panel, I see
> that the only two accounts listed are, "ME-Administrator", and "Guest-
> Turned off". So, I'm set up as the administrator.
>
> If I do a "Properties" on the hosts file, and go to the "Security"
> tab, I see three groups of users, who have the following permissions:
>
> System-Full, Modify, Read and Execute, Read, Write
> Administrator (VISTA_MACHINE\Administrators)-Full, Modify, Read and
> Execute, Read, Write
> Users (VISTA_MACHINE\Users)-Read and Execute, Read
>
> According to the permissions that the system shows, above, I, as
> Administrator, should be able to edit the hosts file. Why can't I?
>
> Thanks.
>


 
Reply With Quote
 
Andrew McLaren
Guest
Posts: n/a

 
      10-08-2007
"Boris" <boris-> wrote ...
> I'm running a new Vista machine, and as Administrator, I want to edit
> my hosts file, but when I complete the edit and try to save, I get: "C:
> \Windows\system32\drivers\etc\hosts was denied".


JC and Rick Rogers have already replied with good info.

To add an explantory note ... it was a favourite method of viruses, bots and
trojans, to write false IP address entries into the HOSTS file. Since name
resolution will often be by HOSTS lookup before DNS, it was a neat way to
hijack URLs to bogus stes.

Hence, the HOSTS file is well-protected in Vista, to prevent exactly this
kind of attack.

But an elevated administrator can edit the file.

Hope it helps,
--
Andrew McLaren
amclar (at) optusnet dot com dot au


 
Reply With Quote
 
Boris
Guest
Posts: n/a

 
      10-09-2007
On Oct 8, 4:27 pm, "Andrew McLaren" <and...@fakeaddress.com> wrote:
> "Boris" <boris-badeno...@excite.com> wrote ...
>
> > I'm running a new Vista machine, and as Administrator, I want to edit
> > my hosts file, but when I complete the edit and try to save, I get: "C:
> > \Windows\system32\drivers\etc\hosts was denied".

>
> JC and Rick Rogers have already replied with good info.
>
> To add an explantory note ... it was a favourite method of viruses, bots and
> trojans, to write false IP address entries into the HOSTS file. Since name
> resolution will often be by HOSTS lookup before DNS, it was a neat way to
> hijack URLs to bogus stes.
>
> Hence, the HOSTS file is well-protected in Vista, to prevent exactly this
> kind of attack.
>
> But an elevated administrator can edit the file.
>
> Hope it helps,
> --
> Andrew McLaren
> amclar (at) optusnet dot com dot au


Thanks for all the tips, everyone. Much appreciated.

 
Reply With Quote
 
DevilsPGD
Guest
Posts: n/a

 
      10-09-2007
In message < om> Boris
<boris-> wrote:

>Question...Do I (ME-Administrator, as listed in the User Accounts
>Panel), fall into the Users (VISTA_MACHINE\Users) category, as listed
>in the security tab? If that is indeed ME in the Users group, will
>enabling Full permissions (if Vista will allow that), or at least
>write permission, let me then edit the hosts file as originally
>planned?


Yes. Pretend you're not a member of the Administrators group except
when you use the "Run as administrator" feature, or otherwise have a UAC
popup.

Give yourself, or "Users" the ability to write a file and you won't need
to run as administrator to do it.

--
You can get more with a kind word and a 2x4 than just a kind word.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not an administrator to change hosts file Hassan Windows Vista General Discussion 2 09-07-2008 02:59 AM
Can't edit /etc/hosts file or run application that I installed under war_wheelan@yahoo.com Windows Vista Security 2 11-29-2007 09:29 PM
Hosts file is being ignored. hs Windows Vista Networking 0 06-20-2007 01:02 PM
hosts file jemminger@gmail.com Windows Vista General Discussion 1 02-19-2007 01:41 AM
hosts file Mr. Newt Windows Vista General Discussion 4 09-02-2006 05:13 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59