[CentOS] NetworkManager constantly overwriting /etc/resolve.conf - how to disable?
heller at deepsoft.com
Sun Nov 29 21:42:50 UTC 2009
At Sun, 29 Nov 2009 22:57:23 +0200 CentOS mailing list <centos at centos.org> wrote:
> Hi all,
> I have a CentOS 5.4 server-only installation, i.e. no X installed, and
> for some odd reason /etc/resolve.conf gets overwritten by
> NetworkManager on a constant basis. I haven't been able to track down
> how often, but I think it's on the hour, or something.
> This is the conents of the file right now:
> # Generated by NetworkManager
> # No nameservers found; try putting DNS servers into your
> # ifcfg files in /etc/sysconfig/network-scripts like so:
> # DNS1=xxx.xxx.xxx.xxx
> # DNS2=xxx.xxx.xxx.xxx
> # DOMAIN=lab.foo.com bar.foo.com
> So, I change it to the following:
> nameserver 192.168.1.254, save it, and all network functions work
> fine. But, later on it get's changed again. Running
> "system-config-network", I can see that the nameserver that I have
> specified is in there, yet it doesn't show up in /etc/resolve.conf.
> I have searched a bit on google, but all the results reveal how to use
> NetworkManager to setup the nameservers, but now how it get's set
> automatically. Why does this happen, and how do I stop it from
You probably DON'T want NetworkManager running on a server!
# Stop NetworkManager
sudo /sbin/service NetworkManager stop
# Disable it from starting at boot time
sudo /sbin/chkconfig NetworkManager off
And then *manually* set things up.
NetworkManager is meant for things like laptops that are (randomly)
connected to this or that WiFi at this or that Internet Cafe, Library,
School, Home WiFi, whatever. NetworkManager automagically adjusts
things as it encounters different networks, etc. A server will have
fixed / static networking and needs no dynamic adjustments.
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