[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hostname problems



On Monday 12 May 2003 11:05 pm, Moe Binkerman wrote:
> From: Alan Lakin <ajlakin@blueyonder.co.uk>
>
> >Reply-To: ajlakin@blueyonder.co.uk
> >To: debian-user@lists.debian.org
> >Subject: hostname problems
> >Date: Mon, 12 May 2003 23:09:15 +0000
> >
> >I have a small network : (teal) Debian Woody, (avocet) Mandrake 9.0 and a
> >smoothwall server running dhcp.
> >
> >The network works just fine i.e. teal and woody can see each other and
> > both can see the internet through the smoothwall router. The problem I am
> > having is that upon boot I get errors in the syslog from any programs
> > that use get_local_host eg. lpd and checkpc say "teal.lakin bad". I have
> > tried using (in the /etc/hostname) teal, teal.lakin,teal.lakin.co.uk. I
> > have also appended details in the /etc/hosts file with the currently
> > allocated IP address.
> >
> >The reason that this is a problem is that I want to setup a network
> > printer (attached to avocet) but it seems that all the tools related to
> > printing error.gethostname() is usually the common factor in the error
> > messages. Any pointers would be welcome.
> >
> >Thanks.
> >
> >--
> >		Alan Lakin
> >	Wallington, Surrey, England
>
> Are your machines on a private network, or public, and are they static? How
> are you getting DNS?
>
> In /etc/hostname you should only have the hostname, none of the domain. In
> both /etc/hosts you should have lines with the ip, the FDQN, then the
> hostname (one line for each machine). Put a line like "search lakin.co.uk"
> in your /etc/resolv.conf Also make sure your /etc/nsswitch.conf has a line
> that says "hosts:    files dns"

Thanks Moe. You've cracked it :-))

Having said that it is still a bit of a kludge. I have entered IPs in the 
/etc/hosts file but as they are dynamically allocated I am going to have a 
problem if I switch the machines on in a different order. How does one 
configure this file correctly to allow for DHCP?

BTW it is a private network, just a few machines at home with an 8 port hub 
switch. The smoothwall server is running DNS on 192.168.1.1 and is connected 
to my cable ISP.

-- 
		Alan Lakin
	Wallington, Surrey, England



Reply to: