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! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
10-07-2007, 12:25 AM
|
#1
|
LQ Newbie
Registered: Mar 2005
Posts: 28
Rep:
|
/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.
Chris
|
|
|
10-07-2007, 12:28 AM
|
#2
|
Member
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170
Rep:
|
I'm sure there is a more elegant way, but as a lazy hack you could make it immutable
chattr +i /etc/resolv.conf
|
|
|
10-07-2007, 01:08 AM
|
#3
|
LQ Newbie
Registered: Mar 2005
Posts: 28
Original Poster
Rep:
|
Hi thanks
I tried that and it did work but it gave me a new error message during start up saying?
FAILED to write to resolv.conf, I can't find the exact error as I'm not sure what log shows the started [ok] or [failed] start up entries.
I looked in the the messages log and found these entries. These seem to be the file over writing my edits.
Oct 6 12:31:38 HELL NET[4339]: /etc/sysconfig/network-scripts/ifup-post : updated /etc/resolv.conf
Oct 6 12:21:58 HELL NET[6137]: /sbin/dhclient-script : updated /etc/resolv.conf
Are there any other ideas? Thanks.
|
|
|
10-08-2007, 08:36 AM
|
#4
|
Member
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170
Rep:
|
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?
|
|
|
10-08-2007, 12:26 PM
|
#5
|
LQ Newbie
Registered: Mar 2005
Posts: 28
Original Poster
Rep:
|
Thanks Jon;
This is what I want in there?
# 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.
nameserver 64.59.160.13
nameserver 64.59.160.15
search gv.shawcable.net
search gv.shawcable.net
nameserver 64.59.160.15
nameserver 64.59.160.13
Thanks again for any help you can give.
Chris
|
|
|
10-08-2007, 01:04 PM
|
#6
|
LQ Newbie
Registered: Sep 2007
Location: /home
Distribution: Linux
Posts: 25
Rep:
|
you must use static ip not dhcp
do it from your network setting in you r distro
regards
|
|
|
10-08-2007, 09:46 PM
|
#7
|
LQ Newbie
Registered: Mar 2005
Posts: 28
Original Poster
Rep:
|
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.
|
|
|
10-09-2007, 09:02 PM
|
#8
|
Member
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170
Rep:
|
Quote:
Originally Posted by cbradlea
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.
|
|
|
All times are GMT -5. The time now is 01:17 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|