Re: [Hampshire] Search domains in resolv.conf

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Search domains in resolv.conf

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x5777d100.hantslug.org.uk.7077': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Wed Oct 3 17:16:38 2007 BST
gpg: using DSA key 20ACB3BE515C238D
gpg: Can't check signature: No public key
On Wed, Oct 03, 2007 at 05:05:29PM +0100, Charlie de Courcy wrote:
> A pet peev of mine I was hoping you might be able to help me with!
> I connect to our company network over standard ethernet Lan, using DHCP
> - however I need to add in an extra 'Search domain' to resolve some
> internal website addresses.
> This works fine for a single session by adding 'search blah.com' into
> the top line of /etc/resolv.conf or via the networkmanager gui; however
> as soon as I restart, it overwrites the information and I lose my search
> domain.


This will be DHCP doing this -- when you connect to the network,
the DHCP server supplies a search path and a set of nameservers to
use. The DHCP daemon on your machine (dhclient, or dhcpcd are the two
most common ones) then writes a new /etc/resolv.conf file to match,
removing anything else.

> I'm running Ubuntu Feisty, though I'm sure fedora did the same - any
> ideas how I can get this configuration to stick?


If you're using dhcpcd as your DHCP client, then there's entries in
the config file (/etc/dhcpc/config on my machine) which tell it which
components of your network config you will allow it to set up.

Debian also has a package called "resolvconf" which should fix
this, although I've always found it a bit hard to get right.

Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
   --- Eighth Army Push Bottles Up Germans Rear -- WWII newspaper ---    
                     headline (possibly apocryphal)