LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-09-2012, 12:26 PM   #1
spungo
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Rep: Reputation: Disabled
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.
 
Old 02-09-2012, 12:34 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just installed? You do know that fc14 is officially no longer supported now? Things move fast!
 
Old 02-09-2012, 12:45 PM   #3
spungo
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-09-2012, 01:34 PM   #4
spungo
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
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...
 
Old 02-09-2012, 01:58 PM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
What is changing to what?
Perhaps networkmanager or some dhcp daemon is making the changes.
try to use
127.0.0.2

Kind regards
 
Old 02-09-2012, 02:15 PM   #6
spungo
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-09-2012, 04:25 PM   #7
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
If your ETH is DHCP enabled then it tends to overwrite /etc/hosts every reboot.
Make it Fixed IP address.
 
Old 02-09-2012, 05:02 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by lithos View Post
If your ETH is DHCP enabled then it tends to overwrite /etc/hosts every reboot.
Make it Fixed IP address.
I've never seen this. resolv.conf sure, but not hosts.
 
Old 02-10-2012, 01:53 AM   #9
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by acid_kewpie View Post
I've never seen this. resolv.conf sure, but not hosts.
You are correct, My BAD, I'm sorry (i was tired)
 
Old 02-10-2012, 02:48 AM   #10
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Network Manager (or some other culprit) over-writes the /etc/hosts file every time you reboot.
Did you verify the settings from network manager?
Try to use
127.0.0.2 in /etc/hosts
To rule out network manager, you could use wicd.

Kind regards
 
Old 02-10-2012, 06:39 AM   #11
spungo
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
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?
 
Old 02-10-2012, 07:45 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with root martianvamp Linux - Newbie 20 01-09-2007 12:56 PM
Problem with root. duffmckagan Mandriva 4 01-22-2006 01:43 PM
root problem phatbastard Slackware 3 12-01-2004 10:28 AM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 04:14 PM
root problem almostnew Linux - General 14 08-28-2001 01:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration