[Gllug] /etc/hosts caching

Peter Childs blue.dragon at blueyonder.co.uk
Wed Jun 2 20:42:39 UTC 2004


Ian Northeast wrote:

> Murray wrote:
>
>> I'm moving a domain between a couple of hosts, and hence I need to be
>> able to tinker with /etc/hosts to map the domain to one ip or another
>> for testing etc.
>>
>> But each time I change it, I have to reboot the computer for the change
>> to be picked up.
>>
>> Is there a way to avoid rebooting?  I'm not running bind or anything
>> locally - the dns is handled remotely, and I don't want to start
>> changing that until I've fully tested.
>
>
> I've only seen this effect when nscd was active and enabled for hosts, 
> which is unusual these days - even Sun have disabled it for hosts by 
> default in Solaris these days.
>
> If you are running nscd, stop it. IMO it achieves very little unless 
> you are in a big slow NIS+ environment which is what it was designed for.
>
> Are you using a web browser? Most of these do their own caching. If 
> this is the problem, restarting the browser will fix it, no need to 
> reboot.
>
> Regards, Ian
>
>
    Hmm I've been running LDAP on some servers and nscd is nessessary to 
get any names at all, so be careful switching it off completly you may 
be unable to log in. However, Resetting it may be helpful. sothing like 
(under debian) /etc/init.d/nscd restart should do the trick.

Peter Childs
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list