Re: hosts, resolv setup?
Thank you for the tip. I have tried your proposal but the problem
remains.
This kind of setup work on RHL(rawhide) and MDK(cooker) though.
On these boxes also /etc/hostname: host4.my.own.domain works. The only
difference is glibc version, 2.2.2 on debian and 2.2.1 on the other,
ssh versions are the same.
Debian and RHL gives the same result for dnsdomainname:
~> dnsdomainname
my.own.domain
Norbert Nemec writes:
> I've struggled with this myself some time ago. My solution was:
>
> /etc/hostname:
> ---------
> mymachine
> ---------
>
> /etc/hosts:
> ---------
> 127.0.0.1 localhost
> 192.168.0.1 mymachine.defaultnet mymachine
> 192.168.1.1 mymachine.secondnet
> ---------
>
> /etc/resolv.conf:
> ---------
> domain defaultnet
> nameserver 123.45.67.89
> ---------
>
> The explanation I found for myself:
> 1. The machine looks up the hostname in /etc/hostname
> 2. The IP-address for that name is looked up in /etc/hosts (with no domain
> added.)
> 3. The first entry for that IP-address is then taken as the FQDN returned with
> the 'dnsdomainname'-command
>
> The tricky part of the whole thing is, that a machine does not necessarily have
> a default FQDN. As in my example above, the machine might be part of two
> networks none of which has to be defined default. There simply is no 1:1
> mapping between machines and hostnames of FQDNs.
>
> For that reason, the 'dnsdomainname'-command really should not be used at all.
> It might give useful information on some machines, but it actually it returns
> garbage on many machines - and as soon as you have more than one
> network-interface, it might not even be possible to define what that command
> should return.
>
> In the same way, the name in /etc/hostname should not be used for
> identification either. On a plain unix machine without additional software for
> authentification etc., there simply is no way to identify a "machine". You can
> only speak of IP-Adresses, DNS-Names and the like.
>
> Unfortunately, there are many programs that depend on that kind of
> "identification" to function properly. Best way is to give up the idea of a
> "correct" configuration and simply try to make those programs happy. The above
> solution has worked for me so far...
>
> Ciao,
> Nobbi
Reply to: