Root problem
Okay, I just installed Fedora 14 -- when I su to root and copy across a hosts file into /etc, on reboot the file reverts back to the old hosts file -- i.e., I can't seem to make command-line changes to the filesystem as root without those changes being reversed on reboot. Is this a new (and friggin' annoying) 'feature' of Fedora, or do I have some silly security setting all wrong?
Any help greatly appreciated. |
just installed? You do know that fc14 is officially no longer supported now? Things move fast!
|
Thanks for your prompt reply, however I have been specifically tasked to install this version of Fedora: the question of its suitability is not mine to answer, hence advising me to upgrade is not helpful.
|
Ok -- problem isolated -- it's only true for the /etc/hosts file. Some stupid process is over-writing the /etc/hosts file with every reboot. This means that one has to manually enter every new host into the GUI -- which can be a big problem if you want to install a large /etc/hosts file on lots of machines -- back in the day one would do it swiftly with a bit of sftp -- now, I have to do it by hand! That's progress, ain't it!
Of all the braindead, lame-ass crap... |
What is changing to what?
Perhaps networkmanager or some dhcp daemon is making the changes. try to use 127.0.0.2 Kind regards |
This is what happens:
I manually edit /etc/hosts file on the command line (using vi, of course ;) ). Next, I reboot, and lo and behold the file /etc/hosts is not how I edited it -- it has reverted back to what it was BEFORE I edited it. If, however, I use the GUI (Gnome) and manually add new hosts one by one, when I reboot, those changes are preserved. It looks like some process (probably related to the Network Manager, if not the Network Manager itself) is re-writing the /etc/hosts file at boot -- re-writing it using whatever was contained in the GUI-entered list each time. In short, Network Manager (or some other culprit) over-writes the /etc/hosts file every time you reboot. This removes the old file and replaces it with what the GUI programme has in its settings with regards to what hosts there are. That's it. |
If your ETH is DHCP enabled then it tends to overwrite /etc/hosts every reboot.
Make it Fixed IP address. |
Quote:
|
Quote:
|
Quote:
Try to use 127.0.0.2 in /etc/hosts To rule out network manager, you could use wicd. Kind regards |
Thanks for your help, folks. I've found another chap / chapesse whose had the same problem: http://ubuntu.5.n6.nabble.com/How-to...td1652990.html
The solution quoted within is to run 'chattr' on the /etc/hosts file to stop Network Manager from overwriting it. That's a bit brutal, but what are ya gonna do, huh? |
Yeah, chattr is the "obvious" solution but it's so so crude, it's always got to be better to work at finding the root cause.
|
All times are GMT -5. The time now is 03:04 PM. |