Hello, I changed ISPs and need to update name servers in resolv.conf. I have tried nano, gedit, Webmin, system-config-network and it won't allow me to make the changes. I have Network Manager turned off and when I enable it , eth0 and eth1 have no entries. I enabled it, added the connections, but still no changes. I'm stuck TIA
On Fri, Jan 13, 2017 at 07:49:48AM -0500, TE Dukes wrote:> Hello, > > I changed ISPs and need to update name servers in resolv.conf. > > I have tried nano, gedit, Webmin, system-config-network and it won't allow > me to make the changes. > > I have Network Manager turned off and when I enable it , eth0 and eth1 have > no entries. > > I enabled it, added the connections, but still no changes. > > I'm stuckI know that in Fedora, resolv.conf is now some symlink to a NetworkManager file (I forget where). Try doing ls -l /etc/resolv.conf, and see if that's the case in CentOS-7 as well. (I don't use NM, so I'm not sure what the case is with it, as the machine I'm using had that change made, if it was needed, long ago. :) ) If it does turn out to be a symlink, copy its information, if you need it, then delete the file, then recreate it. Hope this helps, but I'm not sure. It is a working solution in Fedora. -- Scott Robbins PGP keyID EB3467D6 ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 ) gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
> -----Original Message----- > From: CentOS [mailto:centos-bounces at centos.org] On Behalf Of TE Dukes > Sent: Friday, January 13, 2017 7:50 AM > To: 'CentOS mailing list' <centos at centos.org> > Subject: [CentOS] Unable to edit resolv.conf > > I changed ISPs and need to update name servers in resolv.conf. > > I have tried nano, gedit, Webmin, system-config-network and it won't allow > me to make the changes. > > I have Network Manager turned off and when I enable it , eth0 and eth1 > have no entries. > > I enabled it, added the connections, but still no changes.You haven't done what I've done intentionally, flag /etc/resolv.conf immutable with "chattr +i /etc/resolv.conf" have you? I do this to keep Network Manager and other busybodies from making unwanted / unneeded changes. Al -- Evidence of a dissolute computer.
On 01/13/2017 05:50 AM, Albert McCann wrote:>> -----Original Message----- >> From: CentOS [mailto:centos-bounces at centos.org] On Behalf Of TE Dukes >> Sent: Friday, January 13, 2017 7:50 AM >> To: 'CentOS mailing list' <centos at centos.org> >> Subject: [CentOS] Unable to edit resolv.conf >> >> I changed ISPs and need to update name servers in resolv.conf. >> >> I have tried nano, gedit, Webmin, system-config-network and it won't allow >> me to make the changes. >> >> I have Network Manager turned off and when I enable it , eth0 and eth1 >> have no entries. >> >> I enabled it, added the connections, but still no changes. > > You haven't done what I've done intentionally, flag /etc/resolv.conf > immutable with "chattr +i /etc/resolv.conf" have you? > > I do this to keep Network Manager and other busybodies from making unwanted > / unneeded changes.I've tried to figure out how to get Network Manager to leave various configuration files alone and just gave up - resorting to cron job running as root every minute fixing them if they have been modified. I wish there was better documentation on how Network Manager is configured because I can't figure out how to get it to behave. My home router - the caching nameserver it uses doesn't enforce DNSSEC and crashes about once a week, requiring a restart. So I just don't use it except for my phone and tablet, and just run unbound on my local machines, but Network Manager keeps trying to use the nameserver assigned by the router DHCP (which is the router) and other than a once a minute cron job, can't figure out how to tell Network Manager to ignore the nameserver setting.
Hi, TD> I have tried nano, gedit, Webmin, system-config-network and it won't allow TD> me to make the changes. Selinux enforcing mode activated? best regards --- Michael Schumacher
-----Original Message----- From: CentOS [mailto:centos-bounces at centos.org] On Behalf Of Scott Robbins Sent: Friday, January 13, 2017 8:31 AM To: CentOS mailing list Subject: Re: [CentOS] Unable to edit resolv.conf On Fri, Jan 13, 2017 at 07:49:48AM -0500, TE Dukes wrote:> Hello, > > I changed ISPs and need to update name servers in resolv.conf. > > I have tried nano, gedit, Webmin, system-config-network and it won't > allow me to make the changes. > > I have Network Manager turned off and when I enable it , eth0 and eth1 > have no entries. > > I enabled it, added the connections, but still no changes. > > I'm stuckI know that in Fedora, resolv.conf is now some symlink to a NetworkManager file (I forget where). Try doing ls -l /etc/resolv.conf, and see if that's the case in CentOS-7 as well. (I don't use NM, so I'm not sure what the case is with it, as the machine I'm using had that change made, if it was needed, long ago. :) ) If it does turn out to be a symlink, copy its information, if you need it, then delete the file, then recreate it. Hope this helps, but I'm not sure. It is a working solution in Fedora. Hi, thanks, it does not show it being a sym link.
-----Original Message----- From: CentOS [mailto:centos-bounces at centos.org] On Behalf Of Albert McCann Sent: Friday, January 13, 2017 8:51 AM To: 'CentOS mailing list' Subject: Re: [CentOS] Unable to edit resolv.conf> -----Original Message----- > From: CentOS [mailto:centos-bounces at centos.org] On Behalf Of TE Dukes > Sent: Friday, January 13, 2017 7:50 AM > To: 'CentOS mailing list' <centos at centos.org> > Subject: [CentOS] Unable to edit resolv.conf > > I changed ISPs and need to update name servers in resolv.conf. > > I have tried nano, gedit, Webmin, system-config-network and it won't > allow me to make the changes. > > I have Network Manager turned off and when I enable it , eth0 and eth1 > have no entries. > > I enabled it, added the connections, but still no changes.You haven't done what I've done intentionally, flag /etc/resolv.conf immutable with "chattr +i /etc/resolv.conf" have you? I do this to keep Network Manager and other busybodies from making unwanted / unneeded changes. Hi, I had trouble with this some years ago and remember someone posting how to stop it. I may have. If so, is there a way to undo it? Thanks
On 01/13/2017 04:49 AM, TE Dukes wrote:> I changed ISPs and need to update name servers in resolv.conf....> I have Network Manager turned off and when I enable it , eth0 and eth1 have > no entries. I enabled it, added the connections, but still no changes.If you want to use NetworkManager, edit /etc/NetworkManager/NetworkManager.conf and add "dns=none" in the main section: [main] plugins=ifcfg-rh dns=none If you don't want to use NetworkManager, then set PEERDNS=no and remove any DNS1, DNS2, etc settings in /etc/sysconfig/network-scripts/ifcfg-*
On 01/13/2017 07:10 AM, Gordon Messmer wrote:> On 01/13/2017 04:49 AM, TE Dukes wrote: >> I changed ISPs and need to update name servers in resolv.conf. > ... >> I have Network Manager turned off and when I enable it , eth0 and eth1 >> have >> no entries. I enabled it, added the connections, but still no changes. > > If you want to use NetworkManager, edit > /etc/NetworkManager/NetworkManager.conf and add "dns=none" in the main > section: > > [main] > plugins=ifcfg-rh > dns=none >Thank you!
-----Original Message----- From: CentOS [mailto:centos-bounces at centos.org] On Behalf Of Gordon Messmer Sent: Friday, January 13, 2017 10:10 AM To: CentOS mailing list Subject: Re: [CentOS] Unable to edit resolv.conf On 01/13/2017 04:49 AM, TE Dukes wrote:> I changed ISPs and need to update name servers in resolv.conf....> I have Network Manager turned off and when I enable it , eth0 and eth1 > have no entries. I enabled it, added the connections, but still nochanges. If you want to use NetworkManager, edit /etc/NetworkManager/NetworkManager.conf and add "dns=none" in the main section: [main] plugins=ifcfg-rh dns=none If you don't want to use NetworkManager, then set PEERDNS=no and remove any DNS1, DNS2, etc settings in /etc/sysconfig/network-scripts/ifcfg-* _______________________________________________ Thanks! I made the change in ifcfg-eth0 and eth1 to PERRDNS=no. Then I did a really dumb thing -- I did a service network stop instead of restart. I'm done till I get back home this evening. :-(