/etc/hosts file changes won't save

Issues related to configuring your network
Post Reply
guess
Posts: 8
Joined: 2007/03/11 19:39:25

/etc/hosts file changes won't save

Post by guess » 2007/09/09 02:22:03

I

su - root

vi /etc/hosts
gedit /etc/hosts

I make changes to the file.

In VI I go wq!
In Gedit I hit the save button.

I exit cant /etc/hosts

My changes are there. Then a little bit later the file reverts back to my older /etc/hosts file. I can't find anything consistent.
All I have been doing is su - root and exit. Then starting and stopping my netowrking from the gui.

guess
Posts: 8
Joined: 2007/03/11 19:39:25

Re: /etc/hosts file changes won't save

Post by guess » 2007/09/09 02:23:55

I am running this from with in vmware server. My host is windows XP.

I have to ethernet connection

1. bridged
2. host only

I just deactivated and activated my host-only network connection and /etc/hosts file reverted to an earlier copy again.

yyagol
Posts: 1015
Joined: 2006/06/10 18:27:44
Location: 32 4′N 34 47′E
Contact:

/etc/hosts file changes won't save

Post by yyagol » 2007/09/09 20:07:26

mmm...
after you change the file set the +i attribute
this will keep root and system users from changing the file
even if there is a line some where in a script (like dhclient etc.) it will not have
any effect on the file .

Post Reply

Return to “CentOS 4 - Networking Support”