javaguy Posted June 3, 2005 Report Share Posted June 3, 2005 I'm using Mandrake 10.1, and my /etc/resolv.conf seems to spontaneously change, adding a search line at the beginning that makes web browsing really slow. I created a cron job to remove the offending line once per hour (it seem to reapear a couple times a day), but that's a silly solution. What exactly is changing my resolv.conf, and how do I stop it from putting in the search line? Thanks! Sam Quote Link to comment Share on other sites More sharing options...
spinynorman Posted June 3, 2005 Report Share Posted June 3, 2005 For the background to this, see this thread (now closed). Quote Link to comment Share on other sites More sharing options...
devries Posted June 3, 2005 Report Share Posted June 3, 2005 You need to create a script to tell dhclient not to overwrite resolv.conf. Search the board for one. Or you can make resolv.conf not writable. The command can be found on the board to. Good luck. Quote Link to comment Share on other sites More sharing options...
Qchem Posted June 3, 2005 Report Share Posted June 3, 2005 If you're using ext3 as your fs then you can lock the file: chattr +i /etc/resolv.conf if you ever need to edit it again, the unsurprising unlock is: chattr -i /etc/resolv.conf Quote Link to comment Share on other sites More sharing options...
javaguy Posted June 4, 2005 Author Report Share Posted June 4, 2005 Solved! I edited the /sbin/dhclient-script and commented out the lines that insert the offending search into my resolv.conf. Thanks! Quote Link to comment Share on other sites More sharing options...
Havin_it Posted June 4, 2005 Report Share Posted June 4, 2005 Another method (I prefer this because I have multiple network connections, some needing to update resolv.conf and some not) You can put this directive in /etc/sysconfig/network-scripts/ifcfg-foo (foo=name of your interface, eg 'eth0' for Ethernet connection) PEERDNS=no This stops resolv.conf being overwritten by that connection. Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted August 4, 2005 Report Share Posted August 4, 2005 I've read the /sbin/dhclient-script file, and in theory, Havin_it you're right it should be enough to put PEERDNS=no in the config file. But guess what? I've done as much, and still on reboot the /etc/resolv.conf file is reset to its old non-working content! This evening, I'll see if I have more luck with arctic's suggestion to use pump as a dhcp client... Yves. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.