/etc/resolv.conf getting automatically written over....HELP PLEASE!
Linux - NewbieThis 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!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
/etc/resolv.conf getting automatically written over....HELP PLEASE!
Hi all;
I just recently upgraded my system from mandriva 2007 to cooker 2008.
The problem is that my /etc/resolve.conf which was working fine seems to have been updated with a bunch of new entries. I go in and manually edit it but every time I boot or run dhclient it rewrites the file and re enters all the entries I have edited out. How do I stop the system from regenerating this file automatically. I tried changing the permission to read only but that didn't help, it still got over written. I would appreciate any help you could give thanks.
Well, yeah. Once you make it immutable noboody (including root) can write to it. You would have to remove the immutable bit with chattr -i /etc/resolv.conf
So this is an expected error and I thought it was what you wanted. If it's causing other problems then remove the immutable bit.
Your resolv.conf file just holds the names of your nameservers. What are you putting in there and what is it being overwritten with?
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
search gv.shawcable.net
nameserver 64.59.160.15
nameserver 64.59.160.13
But this is what is showing up. I have tried emptying the file completely, everything, permission. but can't fix it. The problem is with it like this having 6 item it's SUPER slow to connect to the internet like a minute before a page comes up.
In my distro Mandriva 2008 I do have it as a manual not DHCP. Which is weird, Too me this file should not getting updated.
When your computer DHCPs it not only gets an IP address, but it also gets the nameservers.
If you have access to the DHCP server, you can put your Shaw nameservers in there, but if you don't then you'll have to go static as others have pointed out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.