FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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!
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.