Page 1 of 1

can't save values to /etc/resolv.conf

Posted: Wed Mar 13, 2013 6:27 pm
by mattrweaver
Hi. I am trying to set up a webserver on my pi using lighttdp and it appeared to be working. But after a reboot, I have found that changes I made to resolv.conf are wiped out, even when entered as su. I am running the Feb 13 version of Raspian.

I would think about changing file permissions, but if I can't make changes as su, is there something else going on? Like a group that su needs to be part of?

thanks

Re: can't save values to /etc/resolv.conf

Posted: Wed Mar 13, 2013 9:06 pm
by DBryant
You edited via sudo? As in

Code: Select all

sudo vi /etc/resolv.conf
If not, you would normally see a message to the effect you can not write the file.
Re-edit and print the result to verify your changes are in place.

Re: can't save values to /etc/resolv.conf

Posted: Wed Mar 13, 2013 9:27 pm
by jojopi
resolv.conf will be clobbered by dhclient. If you are using DHCP then tell your DHCP server (router) what resolvers you want it to give out.

Re: can't save values to /etc/resolv.conf

Posted: Wed Mar 13, 2013 10:05 pm
by PurpleRaspberry
look in /etc/resolvconf/resolv.conf.d

there should be a file called base that might get added to the resolv.conf file on reboot

throw in a line like:
nameserver 8.8.4.4