View Full Version : edited /etc/resolv.conf will not stick

07-29-2003, 05:10 PM
I have edited my DNS settings in vi and saved this, but when I change user or reboot, the old values come back.

My problem is I cannot resolve web addresses. Modem works, can connect to ISP, but cannot get to websites.

What do I do after I edit /etc/resolv.conf ?

07-29-2003, 06:05 PM
Under the assumption that you are booting from hard drive, you need to edit the file as root.

vi /etc/resolv.conf

If not, perhaps someone who regularly boots the cd could further explain how to save your settings to a persistent home directory.

07-29-2003, 11:42 PM
Look what I just stumbled across on the mailing list:

> I am not allowed to edit /etc/resolv. Although I can edit its
> while "save and exit" it changes back to its original

Known problem as its a symlink ...

As root do:

rm /etc/resolv.conf
ln -s /etc/ppp/resolv.conf /etc/resolv.conf
chmod 644 /etc/resolv.conf



Hope that gets you fixed up.

07-30-2003, 03:34 AM
Thanks for the reply.

I did edit the file as root, and I do have a HDD install. I saved it (I use vi all the time in other work).

However, the problem continues. I did this bit a few more times. The DNS setting sticks if I just change user, but returns to the original value if I reboot.


07-30-2003, 04:11 AM

Belated thanks. My above post was done before I saw your second post.

However .... I tried what you suggested. Still no working DNS with the values that showed up after the suggested procedure. Later, still no working DNS with newly edited values.

But I am rebooting now. Do the new values stick?
.... No. They reverted back to the original values that were in place before I did any editing or did the suggested procedure.

So - tomorrow I'll try some more.

Again, thanks.


08-01-2003, 06:36 AM
Hi All

I am no expert on hard disk install since I operate
with no hard drive. I am sure there is a better
solution but you may find my method useful.

I use the fact that upon boot up KDE runs a startup
folder. Just put a script in here to fixes whatever
ails you. I my case I read the files from a second
cd rom but you have a hard drive so use a folder
-- not /mnt/cdrom1

Click Home --> View --> Show Hidden Files -->.kde
Autostart --> (make you own) MyFixIt.sh

sudo ifconfig eth0 ###.###.###.### netmask
sudo route add default gw ###.###.###.###
sudo cp -fp /mnt/cdrom1/resolv.conf /ect/resolv.conf
contents of resolv.conf

nameserver ###.###.###.###

Best Wishes

08-01-2003, 12:49 PM

Thank you for the tip. I will try it this afternoon when I finish work. Hope it works.