[ubuntu-us-ut] Someone is re-writing my /etc/resolv.conf

Charles Curley charlescurley at charlescurley.com
Thu Dec 20 15:52:32 MST 2007


On Thu, Dec 20, 2007 at 12:16:54PM -0700, Joseph Hall wrote:
> IF you were running Red Hat (and I realize that you're not) then you
> could edit the config file for that interface (i.e.
> /etc/sysconfig/network-scripts/ifcfg-eth0) and add a line that says
> "PEERDNS=no". That would tell the dhcp client not to overwrite the
> /etc/resolv.conf file.
> 
> But you're not running Red Hat. You're running Ubuntu, and it uses a
> single /etc/network/interfaces file for all of the interfaces. But I'm
> 90% certain there's a similar option in Ubuntu. Perhaps the Ubuntu
> Utah folk would know?

I may have a solution.

I conjecture that as long as the dhclient runs, it doesn't update its
configuration files, so it never picks up the changes to dhclient.conf
(wherein I specify my internal name servers as "prepend
domain-name-servers" entries).

I did an ifdown followed by an ifup. This immediately rewrote
/etc/resolve.conf with the correct data. (There's probably some signal
one can send it, but this was simpler.) The lease from the ISP is 24
hours. We'll see if it changes back when the lease is renewed.

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://www.charlescurley.com    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://plug.org/pipermail/plug/attachments/20071220/fb417184/attachment.bin 


More information about the PLUG mailing list