host(1) doesn't read /etc/hosts - it only does DNS lookups - that is, it queries DNS servers. Unless "mymachine" is is registered and available for lookup via one of the DNS servers specified in /etc/resolv.conf , then host is correct in telling you that your machine does not exist. If you're not sure "mymachine" is being resolved correctly otherwise, try `ping mymachine`.
Levi On Tue, 6 Nov 2001 04:02:11 +0100 Steffen Evers <[EMAIL PROTECTED]> wrote: ~Hello, ~ ~I have some problems with the DNS service on my woody system and I think ~I have experienced the same problems on my sid installation: ~ ~Maybe I have misunderstood something, but I think this behavior is not ~correct: ~ ~When I look for the hostname of my local machine with ~ ~> host mymachine ~> mymachine does not exist, try again ~ ~> host localhost ~> localhost A 127.0.0.1 ~ ~I have tried several alternatives in /etc/hosts, but it did not work: ~> 127.0.0.1 localhost mymachine ~or ~> 127.0.0.1 localhost ~> 127.0.0.1 mymachine ~ ~It feels like that the /etc/hosts file is not used at all. ~ ~However, the file /etc/nsswitch.conf does contain the line: ~> hosts: files dns ~ ~Therefore I think everything is set up correctly, but still it doesn't ~work. I have never tried 'host mymachine' before. So, I do not really know ~if this behavior is new. However, my router is set to 'dial on demand' and ~I used to be offline for long periods, but now the router dials in because ~of the DNS query looking for mymachine after a few minutes. Therefore I ~guess this behavior has been introduced to my system by one of my regular ~package updates recently (1 week?). ~ ~Hints, solutions, location for documentation, comments? ~ ~Should I send a bug report? To which package? ~ ~Bye, Steffen ~ ~ ~-- ~To UNSUBSCRIBE, email to [EMAIL PROTECTED] ~with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] ~

