Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 4th August 2009, 03:00 PM
CrystalCowboy's Avatar
CrystalCowboy Offline
Registered User
 
Join Date: Sep 2004
Posts: 536
linuxfedorafirefox
/etc/resolv.conf being overwritten

2.6.29.6-213.fc11.i686.PAE
NetworkManager-glib-0.7.1-8.git20090708.fc11.i586
NetworkManager-openvpn-0.7.0.99-1.fc11.i586
system-config-network-1.5.97-1.fc11.noarch
NetworkManager-openconnect-0.7.0.99-5.fc11.i586
NetworkManager-vpnc-0.7.0.99-1.fc11.i586
system-config-network-tui-1.5.97-1.fc11.noarch
NetworkManager-gnome-0.7.1-8.git20090708.fc11.i586
NetworkManager-0.7.1-8.git20090708.fc11.i586
dhclient-4.1.0-22.fc11.i586

Also happens on 64 bit:
2.6.29.6-213.fc11.x86_64

-----------------------------------------------------------------------
My /etc/resolv.conf file is being overwritten when i reboot.

NetworkManager is OFF and DISABLED.
I am NOT running DHCP.
I am using a single ethernet port configured to a static IP address.

My original /etc/resolv.conf file had several lines, a few nameservers, a "domain" line and a "search" line.

The replacement has only one non-blank line, with a single nameserver on it.
If I comment out the "DNS1" line from /etc/sysconfig/network-scripts/ifcfg-eth0, then I get a blank file for resolv.conf instead.

If I neuter /sbin/dhclient-script, and then reboot, the file does not get overwritten.

So then, since I am not using DHCP, why is /sbin/dhclient-script being run?
__________________
Explore the Core!
Reply With Quote
  #2  
Old 4th August 2009, 03:38 PM
SIGSEGV Offline
Registered User
 
Join Date: Jun 2009
Posts: 60
windows_xp_2003mozilla
Are you using PPP?

I don't know if the sysconfig doc text file is also available on a Fedora installation.
At least on RHEL you would find such a file that roughly explains all available shell script variable definitions in /usr/share/doc/initscripts*/sysconfig.txt

You could run this to check
Code:
$ rpm -qd initscripts | grep sysconfig.txt
/usr/share/doc/initscripts-8.45.14.EL/sysconfig.txt
Therein it states that DNS{1,2} are solely for PPP enabled NIC setups,
i.e. IPPP-specific items (ISDN)

Maybe you have set PEERDNS=yes?


Quote:
Originally Posted by Excerpt from sysconfig.txt

PEERDNS=yes|no
modify /etc/resolv.conf if peer uses msdns extension (PPP only) or
DNS{1,2} are set, or if using dhclient. default to "yes".
DNS{1,2}=<ip address>
provide DNS addresses that are dropped into the resolv.conf
file if PEERDNS is not set to "no".

Last edited by SIGSEGV; 4th August 2009 at 03:41 PM.
Reply With Quote
  #3  
Old 4th August 2009, 03:45 PM
William Haller Offline
Registered User
 
Join Date: Jul 2005
Age: 52
Posts: 1,013
unknownkonqueror
Look at /etc/sysconfig/networking/profiles/default/resolv.conf, rebuilt with system-config-network.
Reply With Quote
  #4  
Old 4th August 2009, 06:19 PM
CrystalCowboy's Avatar
CrystalCowboy Offline
Registered User
 
Join Date: Sep 2004
Posts: 536
linuxfedorafirefox
No, I am not using PPP.

No, I did not set PEERDNS.

# rpm -qd initscripts | grep sysconfig.txt
/usr/share/doc/initscripts-8.95/sysconfig.txt

> Look at /etc/sysconfig/networking/profiles/default/resolv.conf, rebuilt with system-config-network.

I looked at it. It looks like the original I installed, not like the short form that is being overwritten.



This gets me back to my question: why is dhclient-script being run when I am not using DHCP?
__________________
Explore the Core!
Reply With Quote
  #5  
Old 5th August 2009, 02:16 PM
CrystalCowboy's Avatar
CrystalCowboy Offline
Registered User
 
Join Date: Sep 2004
Posts: 536
linuxfedorafirefox
From /var/log/messages:
Aug 5 08:50:30 titan nm-system-settings: Loaded plugin ifcfg-rh: (c) 2007 - 2008 Red Hat, Inc. To report bugs please use the NetworkManager mailing list.
Aug 5 08:50:30 titan nm-system-settings: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth0 ...
Aug 5 08:50:30 titan nm-system-settings: ifcfg-rh: read connection 'System eth0'
Aug 5 08:50:30 titan nm-system-settings: ifcfg-rh: Ignoring connection 'System eth0' and its device because NM_CONTROLLED was false.
Aug 5 08:50:30 titan nm-system-settings: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...

Since I have NetworkManager turned OFF and DISABLED, why is nm-system-settings running?
__________________
Explore the Core!
Reply With Quote
  #6  
Old 5th August 2009, 04:53 PM
jfprieur Offline
Registered User
 
Join Date: Aug 2008
Location: Montreal, QC, CAN
Age: 43
Posts: 61
linuxsafari
I have had this happen to me as well, my resolv.conf was overwritten with one that says '#Generated by Network Manager'. Very annoying...running FC11 64-bit.
Reply With Quote
  #7  
Old 6th August 2009, 05:00 PM
nomisunrider Offline
Registered User
 
Join Date: Oct 2006
Age: 34
Posts: 40
windows_xp_2003firefox
This is REALLY annoying. I even removed Networkmanager (yum remove NetworkManager) and and still getting a "generated by networkmanager" resolv.conf
Reply With Quote
  #8  
Old 30th August 2009, 05:11 PM
lmgutie Offline
Registered User
 
Join Date: Jul 2008
Posts: 59
linuxfedorafirefox
Have you guys tried turning off the "Controlled by NetworkManager" flag from system-config-network?

It helped me, but then another problem I found is that after this change the "generated by network manager" issue is replaced by "generated by /sbin/dhclient-script"; and my resulting /etc/resolv.conf is not working properly.

But if you're not using dhcp, the problem you described may go away.

Last edited by lmgutie; 31st August 2009 at 04:55 AM. Reason: Clarify message
Reply With Quote
  #9  
Old 30th August 2009, 06:51 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,551
windows_xp_2003ie
Quote:
Originally Posted by lmgutie

My problem is that after this change the "generated by network manager" issue is replaced by "generated by /sbin/dhclient-script"; my resulting /etc/resolv.conf is not working properly.
Hello lmgutie,

If you ever want to use NetworkManager to manage your connection, there is a place in the NetworkManager panel applet to enter DNS nameserver IP addresses. You can then forget about the Network Configuration utility and enter your nameservers in the IPv4 Settings tab in "Edit Connections..." of the NetworkManager panel applet. NetworkManager will then write them to /etc/resolv.conf. I use NetworkManager, and I had to do this when I first installed F11 or else Firefox, yum, and wget could not connect.

P.S.: If you've been using DHCP, then change the "Method" on the IPv4 Settings tab page to "Automatic (DHCP) addresses only". Then you will see where to enter the DNS nameserver IP addresses.

Last edited by stoat; 30th August 2009 at 07:52 PM.
Reply With Quote
  #10  
Old 31st August 2009, 04:11 AM
lmgutie Offline
Registered User
 
Join Date: Jul 2008
Posts: 59
linuxfedorafirefox
Hi Stoat,

No, I don't want to use NetworkManager. I use DHCP on a desktop computer, so I would expect system-config-network to set all that up easily for me.
From F4 to F11, dhcp had worked fine without having to deal with DNS manually, but now I'm struggling with a fresh installation.

Luis
Reply With Quote
  #11  
Old 31st August 2009, 07:50 AM
ferrata_vi Offline
Registered User
 
Join Date: Aug 2009
Posts: 17
windows_vistafirefox
Open up the following, or a similar file...

/etc/sysconfig/networking/profiles/default/ifcfg-eth0

This file, like a lot of the networking files is hard-linked in one or two other places. In that file you will find two entries...

DNS1=xxx.xxx.xxx.xxx
DNS2=xxx.xxx.xxx.xxx

If those are defined, try commenting them with hashes "#"

The system automatically rebuilds the resolv.conf from network device profiles when you boot... I think it's network manager that does it. This file is hard-linked in at least two places... /etc and /etc/sysconfig/networking/profeils/default/ If the two don't match, then you've unlinked them somehow. Either way though, the system automatically rebuilds the operative file from the settings mentioned above.

Keep in mind I'm running systems with only one interface each... no telling what happens when you config different settings on two.
Reply With Quote
  #12  
Old 1st September 2009, 03:06 AM
rbroberts Offline
Registered User
 
Join Date: Sep 2005
Location: Brooklyn, NY
Posts: 55
linuxfedorafirefox
Quote:
Originally Posted by ferrata_vi View Post
Keep in mind I'm running systems with only one interface each... no telling what happens when you config different settings on two.
What happens is that you pull your hair out then finally disable NetworkManager. I spent a good hour yesterday trying to figure out how to get the configuration right so that NetworkManager would not scramble my connections . This was on a clean F11 install on a host that acts as a firewall/gateway. I have two interfaces active each with aliases. I had perfectly working ifcfg-ethX files under Fedora 8 but those same configurations would not work. Until I turned of NetworkManager.

If you have only one interface and are in a setting where DCHP will assign your IP address (desktop, laptop), NetworkManager is fine (I use it on my laptop). But on my gateway, I finally did "just say no".

roland
Reply With Quote
  #13  
Old 1st September 2009, 06:17 AM
ferrata_vi Offline
Registered User
 
Join Date: Aug 2009
Posts: 17
windows_vistafirefox
Ha ha - yeah, I feel your pain. After spending a day playing with both hard-wired and wireless interfaces, I'm about to "just say no" to NetworkManager as well.
Reply With Quote
  #14  
Old 3rd September 2009, 02:01 PM
David P Offline
Registered User
 
Join Date: Feb 2007
Posts: 6
windows_vistafirefox
Just to sympathise. I've just got rid of NetworkManager, the finest protection a network can get, just to have my resolv.conf broken by dhclient. You pays your money and you takes your choice. Oh for some simple documentation.

In the past I've hard coded the file and then used chattr +i /etc/resolv.conf to make it immutable. Don't change it that much anyway.
Reply With Quote
  #15  
Old 3rd September 2009, 04:22 PM
David P Offline
Registered User
 
Join Date: Feb 2007
Posts: 6
windows_vistafirefox
Finally added a line to /etc/dhclient-eth0.conf

prepend domain-name "mydomain";
Reply With Quote
Reply

Tags
or etc or resolvconf, overwritten

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
resolv.conf being overwritten drunkahol Using Fedora 5 24th July 2007 05:47 PM
Fix nameservers on /etc/resolv.conf not to be overwritten on connecting satimis Servers & Networking 2 16th February 2006 11:42 AM
FC3: resolv.conf overwritten despite PEERDNS=no VinzC Servers & Networking 4 27th November 2004 10:00 PM


Current GMT-time: 09:24 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat