FedoraForum.org - Fedora Support Forums and Community
Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    Join Date
    May 2006
    Location
    Caracas, Venezuela
    Posts
    1,886
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some times dhcp do that if dhcp server is instructed to pass DNS address.
    Pietro Pesci Feltri

    PowerBook 15" G4 and
    MacBook Pro 17" Intel Core 2 Duo
    Intel I5 Desktop

  2. #17
    Join Date
    Jan 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only write a file:

    But check you interface:
    Code:
    su -c '/sbin/route -n'
    Now check "Iface" if is "eth0" then write.

    Code:
    su -c 'nano /etc/dhclient-eth0.conf'
    Write:

    Code:
    prepend domain-name-servers xxx.xx.xx.xxx;
    When "xxx.xxx.xxx.xxx" is your DNS of your IPS.

    Save and restart "NetworkManager"

    Code:
    su -c '/sbin/service NetworkManager restart'
    Ready!

  3. #18
    Join Date
    Jul 2007
    Location
    Virginia
    Posts
    252
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This behavior is fixable.

    If you are using the F10 version, u can right click the NM applet icon and choose "edit connections". From there, find your connection, and click the edit button. Go the the IPv4 tab and from the drop down called method, choose "Automatic (DHCP) Addresses Only". Now you can enter your custom DNS information and NM will no longer overwrite resolv.conf.

  4. #19
    Join Date
    Sep 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Network Manager overwrites resolv.conf

    SOLUTION:

    [root@localhost ~]# chkconfig | grep -i manager

    [root@localhost ~]# chkconfig NetworkManager off

    Reboot your host & check /etc/resolv.conf again

    That's it

  5. #20
    Join Date
    Mar 2009
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Network Manager overwrites resolv.conf

    6 years down the road, NetworkManager-0.9.9.0-41.git20131003.fc20, the answer appears to be to add "dns=none" to the [main] section of /etc/NetworkManager/NetworkManager.conf.

  6. #21
    Join Date
    Aug 2010
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: overwrites of resolv.conf

    Quote Originally Posted by Kludge
    I had this problem as well.
    My /etc/resolv.conf file kept being overwritten on reboot with a message in it that said:
    # generated by NetworkManager, do not edit
    I had already turned off NetworkManager as a service entirely, so I removed it too:
    rpm -e NetworkManager NetworkManager-...
    but the /etc/resolv.conf kept being overwritten on reboot with that "generated by NetworkManager" message in it! WTH?

    It turns out that if you have a file called /etc/resolv.conf.save, it overwrites /etc/resolv.conf on reboot. There are a number of scripts that will generate a /etc/resolv.conf.save. I blew away my /etc/resolv.conf.save and now everything works. It really was not a NetworkManager problem.
    I had the exact same issue. This explanation and solution solved the problem for me.

  7. #22
    Join Date
    Jan 2010
    Posts
    8,696
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: Network Manager overwrites resolv.conf

    Interesting that 8 years down the road, the same issue happens. In Fedora 24 at least, if one removes NetworkManager, /etc/resolv.conf becomes a broken symlink to a file in a NetworkManager subdirectory--I've already forgotten which, something like /var/lib/NetworkManager? One has to remove the file, recreate it, and put their DNS servers in there. I think you can also add it to your interface's file in /etc/sysconfig/network-scripts, but I usually don't.

  8. #23
    stevea Guest

    Re: Network Manager overwrites resolv.conf

    You shouldn't have to manually edit it if your dhcp service is properly configured - for either Netw..M... or 'network' services.

  9. #24
    Join Date
    Jan 2010
    Posts
    8,696
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: Network Manager overwrites resolv.conf

    No, you shouldn't. But, what happened at least twice was that after removing NetworkManager, when running dhclient on an interface, I was unable to reach sites by name. I looked at /etc/resolv.conf to find that it was a broken link to a NetworkManager file as mentioned, and had to manually edit it. (This is in Fedora 24, I don't believe I had it happen in F23, and I treat it the same way--F24 is beta at the moment, I believe.)

    This was on a minimal install, NetworkManager removed, (not replaced with network, as I usually boot, then choose if I'll be wired or wireless), rebooting, running dhclient on the wired interface.

  10. #25
    Join Date
    Jan 2010
    Posts
    8,696
    Mentioned
    41 Post(s)
    Tagged
    0 Thread(s)

    Re: Network Manager overwrites resolv.conf

    Ok, just checked with a fresh F24 install from server netinstall from 4/27.

    Upon reboot, /etc/resolv.conf is a symlink to /var/run/NetworkManager/resolv.conf

    So, removing NetworkManager (and not setting up anything else), breaks that link and it has to be removed and manually added.

    Now, if I just disable, rather than remove NetworkManager, and enable network, it seems to do the same thing at this point,
    resolve.conf becomes a broken link and it can't do name resolution. So, useful to know, though I don't know if this is simply a beta bug or the way they plan to go.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. resolv.conf ignores hosts file. host.conf is correct
    By mlee07946 in forum Servers & Networking
    Replies: 2
    Last Post: 17th September 2013, 08:37 PM
  2. Samba SWAT - Creating New Share Overwrites Previous ones in smb.conf
    By AoiShikaku in forum Servers & Networking
    Replies: 4
    Last Post: 24th July 2008, 05:05 PM
  3. vpnc + networkmanager overwrites the resolv.conf
    By gregor2005 in forum Servers & Networking
    Replies: 2
    Last Post: 16th January 2008, 02:03 AM
  4. Network manager keep messin up resolv..conf
    By chriske21 in forum Servers & Networking
    Replies: 6
    Last Post: 13th January 2008, 01:31 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •