Changes to /etc/resolv.conf don't stick

Kevin plug-discuss at firstpacket.com
Mon Jan 23 14:06:37 MST 2006


On 1/23/06 12:31 PM, "Siri Amrit Kaur" <tigerflag at tigerflag.com> wrote:

> [tigerflag at localhost ~]$ ps aux | grep dhc
> root      2423  0.0  0.1  2208  976 ?        S    Jan16   0:00 /sbin/dhclient
> -1 -q -lf /var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid
> -cf /etc/dhclient-eth0.conf eth0
> tigerfl   6854  0.0  0.1  2032  632 pts/1    S    13:27   0:00 grep dhc

Okay, good.  You are using dhclient as your dhcp client.  So, as Darrin
said, it's not a big deal that you currently have no dhclient.conf file.  It
just means dhclient is using all it's default settings.  Since we only want
to change ONE setting (ignore name-servers you learn via DHCP) we need a
dhclient.conf file with a single supersede command.

So... let's do this.

You probably have a directory named /etc/dhcp3.  If so, change into that
directory.  If not, just change into /etc.
  cd /etc/dhcp3 
    -or-
  cd /etc

Become root:
  sudo -s 
    -or-
  su -

Run this command (all on one line) as root:
  echo "supersede domain-name-servers 204.62.193.10, 204.62.193.7,
204.62.193.3; >> ./dhclient.conf

Check your work, you should see your supersede command on the last line:
 tail ./dhclient.conf

If all that goes as planned, restart dhclient (still as root):
  killall dhclient && dhclient

Change back to normal user:
  exit

Now check your resolv.conf file:
  cat /etc/resolv.conf


Let me know how that goes.

...Kevin






 
>> Also, check for hints in /var like this:
>>  find /var/run -name "dhc*"
>> 
>> Do you get any hits on this?
>> 
> 
> # find /var/run -name "dhc*"
> /var/run/dhclient-eth0.pid
> 
> 
> Siri Amrit



More information about the PLUG-discuss mailing list