'host' command not using /etc/hosts?

'host' command not using /etc/hosts?

Post by Steve Chauv » Mon, 05 Sep 1994 05:40:00



I have several hostnames and addresses in /etc/hosts.  I can telnet and
ping to these hostnames no problem.  However, the 'host' command does
not recognize the hostnames.  I am not connected to a dns at this point,
nor am I running named (I think).

Doesn't the host command basically call gethostbyname()?  I wrote a
simple program and gethostbyname() returns the addresses ok.

I've tried switching the "order bind, hosts" line in host.conf, no change.
What's the problem here?

Thanks much.

--
== Steve Chauvin                                                             ==
== The return address in this message will bounce.                           ==

 
 
 

1. Now that resolver is used, mail ignores 'mailhost' in /etc/hosts

System: Sun 3/160 running SunOS 4.1, *no* YP

I had been having problems getting ftp, telnet, finger, etc. to use the
nameserver.  I received a suggestion to rebuild /usr/lib/libc.so with
the inclusion of some .o's from libresolv.a.  This worked pretty well;
all address resolution was now done through the nameserver.  Unfortunately,
this makes /etc/hosts completely ignored.  Its not *that* intolerable,
but the /etc/hosts contained some convenient nicknames for local machines
that the resolver doesn't know about.  C'est la vie.

Worse, however, is the fact that sendmail no longer knows what 'mailhost'
is.  Outgoing mail is completely dead with regards to non-local sites.
Am I doing something wrong, or are there some changes that I need to make
in sendmail.cf?

thanks,
Roger

--
"The question of whether a computer can think is no more interesting
 than the question of whether a submarine can swim" - Edsgar W. Dijkstra


2. Can someone please explain this to me?

3. Limit Telnet's to Host in /etc/hosts

4. CD-ROM can not mount music CD

5. SOLUTIONS TO: /etc/rc.net, /etc/host.conf and 'ps' problems

6. Linux on Dell PCs?

7. Can't ping the host name or host IP address from host.

8. rsh permissions (ttys??)

9. can't ping host or host IP from host ?

10. Get 'cannot connect to host', yet can ping remote host!!

11. /etc/hosts (or NIS host map): official-host-name vs nicknames

12. grep command and EXACT host entry in /etc/hosts

13. Sendmail 8.6.12: using /etc/hosts to send to domainless hosts