Solved

unable to edit hosts files on server 2008 r2

Posted on 2014-03-14
5
2,389 Views
Last Modified: 2014-04-23
I am trying to edit hosts files on some servers and getting an access denied. I am logging in with the local administrator account and running notepad as an administrator but it will not allow me to save the updated hosts file in the etc folder. I also cannot save the file elsewhere and copy it to the etc folder; I still get access denied. I have tried to take ownership of the file and also get access denied message. I have other servers that allow editing of the hosts file with my normal domain admin account and no elevated privileges on notepad. Is there a registry setting or GPO entry that could cause this type of behavior? The servers are all general application servers with no special settings or permissions applied. Some of them are SQL servers but some of them are not and still have the same issue.
0
Comment
Question by:MehtaJasmin
5 Comments
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 39929282
hi,

run CMD as elevated command "Run As Administrator".
type notepad
it will open the notepad, now open the host file , edit and save it.
0
 
LVL 1

Expert Comment

by:kchall
ID: 39929292
if you copy the file to your desktop then edit the file then save it back to your desktop then copy it back to the original location
0
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39929309
Hi

Did you disable UAC on that box?
0
 

Author Comment

by:MehtaJasmin
ID: 39930123
Santosh and kchall, thank you for your replies but as I stated, I'm running notepad as administrator and it doesn't allow me to save the file elsewhere and copy it to the etc folder.

Patrick, no I did not disable UACs because I was able to edit the hosts file on another server with the UACs enabled. I will try disabling them to see if it makes a difference. Thanks for the reply.
0
 
LVL 13

Accepted Solution

by:
Santosh Gupta earned 500 total points
ID: 39930135
check the permission of ETC folder and HOST file. if administrators is not added then pls add.

if you are still unable to modify the host file  then take the ownership of EC folder. Do not remove any permission.  and then try.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
online backup for win98se 30 41
prepare AD for 2012 R2 6 99
Why is a PSO not being set for users 2 24
Installing OS on Poweredge 2800 Raid 1 97 45
Hallo! I guess almost every Windows Administrator must have got stumped with this question "Where does WINDOWS store a users cached credentials? Every user who had once logged onto a Server/Desktop while it was connected to the domain could sti…
Many times while working on a computer regardless of any Operating System, lag and crashes seem to creep in, hindering your working speed. Sometimes, it can also cause your work to be lost unexpectedly and as a result, you are unable to meet your de…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now