mattrweaver
Posts: 15
Joined: Thu Sep 20, 2012 3:07 am

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

Wed Mar 13, 2013 6:27 pm

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

DBryant
Posts: 281
Joined: Sat Feb 02, 2013 12:41 pm
Location: Berkshire, UK

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

Wed Mar 13, 2013 9:06 pm

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.

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

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

Wed Mar 13, 2013 9:27 pm

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.

PurpleRaspberry
Posts: 6
Joined: Wed Mar 13, 2013 9:48 pm

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

Wed Mar 13, 2013 10:05 pm

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

Return to “Troubleshooting”