Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Resolv.conf overwritten by Network Manager wipes my settings

  1. #11
    Join Date
    Jan 2010
    Beans
    12

    Re: Resolv.conf overwritten by Network Manager wipes my settings

    Okay, these are the settings I end up plugging into the /etc/resolv.conf file and the /etc/network/interfaces file in order to get static IP to work within the schools network, which has its own designated DNS addresses (I've removed the final numerals in each address) and replaced the universities access address with www.----.com.

    As I said before, I need to be able to keep the settings within the resolv.conf file in order for the wired internet to work properly. These settings work fine until we access wireless somewhere else and then come back to the wired connection. We then have to re-enter the same code into the resolv.etc every time before connecting to the network. Even while the computer is connected, Network Manager does not recognise the connection, though the internet does work.

    /etc/resolve.conf
    Code:
    search www.----.com
    nameserver 131.111.xxx.x
    nameserver 131.111.x.xx
    nameserver 131.111.xx.xx
    /etc/network/interfaces
    Code:
    auto lo
    iface lo inet loopback
    
    auto eth0
    
    iface eth0 inet static
    address 131.111.xxx.xxx
    netmask 255.255.xxx.x
    network 131.111.xxx.x
    broadcast 131.111.xxx.xxx
    gateway 131.111.xxx.xx
    Is there a way to enter some instructions for wireless in the interfaces file? Then I can write-protect the file, as suggested above, so the settings aren't reset by Network Manager.

    Thanks.

  2. #12
    Join Date
    Dec 2009
    Beans
    110
    Distro
    Ubuntu

    Re: Resolv.conf overwritten by Network Manager wipes my settings

    I just need your bank account number and sort code, and we can wire you the monies directly.

  3. #13
    Join Date
    Dec 2009
    Location
    Chennai, India
    Beans
    117

    Re: Resolv.conf overwritten by Network Manager wipes my settings

    Hi,

    The entries which you have made in /etc/resolv.conf and /etc/network/interfaces can also be made using the Network Manager applet.

    Go to System->Preferences->Network Connections->Auto ethX->Edit->IPv4 Settings, change the method from "Automatic (DHCP)" to "Manual". In the "Address" column click on "Add" and enter your IP Address, Netmask and Gateway.

    If you want to use Multiple DNS servers, in the "DNS servers:" box, enter the IP addresses of the DNS servers as a comma-separated list.

    It should look like this: 131.111.xxx.x, 131.111.x.xx

    In the "Search domains:" box enter your university's domain name (without www)

    More Details can found in the following link
    https://help.ubuntu.com/community/NetworkManager0.7


  4. #14
    Join Date
    Apr 2010
    Beans
    14

    Re: Resolv.conf overwritten by Network Manager wipes my settings

    try this..

    cd /etc/NetworkManager/system-connections
    sudo vi Auto\ eth0
    # below [ipv4]
    dns=x.x.x.x;x.x.x.y;...;

  5. #15
    Join Date
    Aug 2008
    Beans
    54

    Re: Resolv.conf overwritten by Network Manager wipes my settings

    I have this problem also on 10.04 with my HP MiniNote 2133.
    If I plug in my ethernet, resolv.conf is correct. However, doing any network access (like ping) gives a permission denied!
    Connecting my wireless results in a blank resolv.conf file. If I add the nameservers manually, wireless works.
    And my /etc/network/interfaces file only has the l0 loopback interface in it.
    This all worked in the previous Ubuntu release.

  6. #16
    Join Date
    Jan 2010
    Beans
    16

    Re: Resolv.conf overwritten by Network Manager wipes my settings

    I am by no means an expert, and I use the kde interface instead of the gnome interface, so please take what I'm writing with several grains of salt.

    Network manager expects to manage everything related to network connections, including resolv.conf, wired and wireless interfaces and so on, so making such stuff readonly for it should definitely break it.

    Network manager allows you to configure various network connections via its own graphical user interface. You can configure each connection whether it should use DHCP, if it should use a fixed IP, what DNS servers it should use, which interface it should go over and whatnot. This information is written into its configuration, somewhere in a subdirectory in a hidden directory in the user's home (I think somewhere beneath .kde or the like on my KDE-based system). Whenever you tell it to connect via a particular connection, it retrieves this information from there, and sets up resolv.conf, interfaces and whatever else is needed corresponding to what you have configured, so there's no need to manually edit DNS servers, resolv.conf or anything else - the network manager will do it for you.

    If you bypass the network manager's configuration, of course it won't know how it should configure the machine for various connections. If you don't want to use the network manager's configuration, you may uninstall it and write your own scripts for each connection type. You cannot, however, bypass network manager's configuration and expect it to find out all by its own how to configure networking under various circumstances.

    Hope this helps.

    br,

    flj

  7. #17
    Join Date
    Aug 2008
    Beans
    54

    Re: Resolv.conf overwritten by Network Manager wipes my settings

    It was a bug in Network Manager. It has been fixed for a year now.

  8. #18
    Join Date
    Nov 2009
    Beans
    4

    Re: Resolv.conf overwritten by Network Manager wipes my settings

    I had this issue in Ubuntu 11.10 and the following did the trick for me, thanks.
    Code:
    sudo chattr +i /etc/resolv.conf
    Last edited by Terentius; October 16th, 2011 at 05:36 PM.

  9. #19
    Join Date
    Dec 2010
    Beans
    43

    Angry Re: Resolv.conf overwritten by Network Manager wipes my settings

    Quote Originally Posted by Terentius View Post
    I had this issue in Ubuntu 11.10 and the following did the trick for me, thanks.
    Code:
    sudo chattr +i /etc/resolv.conf
    This does not work on 11.10. I try it. If we had write as dns 8.8.8.8 network manager write this to /etc/resolv.conf. If we lock the /etc/resolv.conf, this is not problem for network manager. Network manager still use 8.8.8.8. You can edit, remove, lock the /etc/resolv.conf file, this will not change anything. I try it many many times.

    I need to change my DNS from terminal. I open a thread here: http://ubuntuforums.org/showthread.php?t=1863755 But could not help me anyone yet...

  10. #20
    Join Date
    Apr 2007
    Beans
    3

    Re: Resolv.conf overwritten by Network Manager wipes my settings

    sudo resolvconf --disable-updates

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

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