Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-04-2009, 07:46 AM   #1
Registered: Nov 2008
Location: Egypt
Distribution: Ubuntu, SuSE
Posts: 101

Rep: Reputation: 16
resolv.conf changes automatically in Ubuntu

Hi all I am Using Ubuntu 8.10 & 9.04 & am joining a windows domain network .. everytime I change the nameserver of the resolv.conf .. it changes again automatically after I reconnect to network .. I am installing the Samba package of the Ubuntu .. is that the reason or anything else .. Thanks.
Old 05-04-2009, 08:02 AM   #2
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899

Add your settings to /etc/dhcp3/dhclient.conf
Old 05-04-2009, 08:03 AM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
If you are using DHCP, you can configure your system to use fixed addresses for DNS*---or to get the addresses using DHCP. If is somewhere in the network configuration menus/utilities.

*Domain Name Service----the DNS servers are what is listed in resolv.conf
Old 05-08-2009, 07:00 AM   #4
LQ Newbie
Registered: Sep 2007
Posts: 13

Rep: Reputation: 1
I have just resolved a similar problem after installing fc10.

It seems that the Network Manager causes resolv.conf to be clobbered when no DHCP is available. NM is supposed to update resolv.conf if the ifcfg-eth0 contains directive PEERDNS=yes. When DHCP tells it what servers to use, it uses those. If DHCP is unavailable NM reads ifcfg-eth0 for DNS directives and uses those instead. If no DHCP and no DNS directives are available then the update of resolv.conf should not take place - but it does, placing null values for DNS into resolv.conf.

I fixed this by writing DNS directives into ifcfg-eth0. I suppose equally one could block all NM activity with NM_CONTROLLED=no, or you could block updating resolv.conf with PEERDNS=no. I did it my way so that I could easily use DHCP when it becomes available.

On FC10 if, you have not set up any named network configuration profiles, the files read by NM are in /etc/sysconfig/networking/profiles/default/

Last edited by steve_s; 05-08-2009 at 07:01 AM. Reason: improved clarity


manager, network, resolvconf

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
/etc/resolv.conf getting automatically written over....HELP PLEASE! cbradlea Linux - Newbie 7 10-09-2007 08:02 PM
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 09:21 AM
/etc/resolv.conf Pedroski Linux - Networking 1 06-22-2004 10:03 AM
resolv.conf?? wrat Linux - Newbie 3 06-14-2004 04:37 PM
resolv.conf is not updated automatically metalyric Linux - Networking 9 06-04-2004 05:51 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:28 AM.

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