[CentOS] resolv.conf rewritten every reboot. How to figure out who and why?

Robert Heller heller at deepsoft.com
Fri Oct 9 00:04:13 UTC 2009


At Thu, 8 Oct 2009 11:19:18 -1000 CentOS mailing list <centos at centos.org> wrote:

> 
> On Thu, Oct 8, 2009 at 9:49 AM, Spiro Harvey <spiro at knossos.net.nz> wrote:
> > chkconfig for dhclient too, and see what that results.
> 
> 
> [root@ ~]# chkconfig --list|grep  -e dh -e clie
> [root@ ~]#
> 
> >
> > Also, look at /etc/sysconfig/network-scripts/ifcfg-eth0.
> 
> 
> [root at lee1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
> # Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express
> DEVICE=eth0
> BOOTPROTO=none
BOOTPROTO=static
> HWADDR=00:18:8b:0f:ad:c2
> IPADDR=1[snip]0
> ONBOOT=yes
> DHCP_HOSTNAME=[snip]
???
> DNS1=1[snip]0
> DNS2=1[snip].2
???
> NM_CONTROLLED=no
> SEARCH=[snip]
> NETMASK=255.255.255.0
> DNS3=1[snip]0
???
> GATEWAY=1[snip]0.1
> TYPE=Ethernet
> USERCTL=no
> PEERDNS=yes
???
> IPV6INIT=no
> 
> >
> > It's possible to have addresses "statically" assigned via DHCP based on
> > MAC addresses. If resolv.conf is getting populated by dhclient, then
> > I'm guessing the odds of you having a dhcp server on your network is
> > good. :)
> 
> You guessed right. But the question remains, what software is writing the file?
> 
> > In all likelihood, you have a static IP assigned in your ifcfg-eth0,
> > and the resolv.conf is being over-written by dhclient.
> 
> What is invoking dhclient, how do I find it?
>  rpm -qR dhclient
> /bin/bash
> initscripts >= 6.75
> libc.so.6()(64bit)
> libc.so.6(GLIBC_2.2.5)(64bit)
> libc.so.6(GLIBC_2.3)(64bit)
> libc.so.6(GLIBC_2.3.4)(64bit)
> libc.so.6(GLIBC_2.4)(64bit)
> libc.so.6(GLIBC_2.8)(64bit)
> rpmlib(CompressedFileNames) <= 3.0.4-1
> rpmlib(PayloadFilesHavePrefix) <= 4.0-1
> rpmlib(VersionedDependencies) <= 3.0.3-1
> rtld(GNU_HASH)
> 
> Dave
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 
>                                                                                                        

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller at deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
  


More information about the CentOS mailing list