The following reply was made to PR os-solaris/1052; it has been noted by GNATS.
From: Dean Gaudet <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: os-solaris/1052: Server unable to obtain correct hostname when running NIS (fwd) Date: Mon, 22 Sep 1997 02:05:11 -0700 (PDT) ---------- Forwarded message ---------- Date: Fri, 19 Sep 1997 08:28:35 +0100 From: Ralph Bolton <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: os-solaris/1052: Server unable to obtain correct hostname when running NIS > Synopsis: Server unable to obtain correct hostname when running NIS > > State-Changed-From-To: open-analyzed > State-Changed-By: dgaudet > State-Changed-When: Thu Sep 18 12:43:48 PDT 1997 > State-Changed-Why: > I think this is the same reason that sendmail suggests you build /etc/hosts > files and NIS tables like this: > > 1.1.1.1 hostname.domain hostname > > What happens when you do that? No problem - works fine. However, I suspect that most people using a "hosts" based name lookup (eg files/NIS) probably don't have the domain appended to all their hostnames in the first column. However, it does work like that. AFAI can see, I think the best solution is to do the equivalent of "nslookup `hostname`". Ie. Query the default host database for the name, using gethostbyxxx(). Then, see if it has any dots in it, if so, fine, if not, then do a DNS lookup or something for the FQDN. FYI: Sun's new webserver (SWS) does it exactly right - they've obviously got workarounds to their own short comings!! Thanks very much, by the way, for getting back to me! Good luck! ...Ralph Bolton =============================================================================== Ralph Bolton, Unix Developer, GEC Plessey Semiconductors, Oldham, UK. Phone: 0161 684 4156 Fax: 0161 688 7898 E-Mail: [EMAIL PROTECTED] =============================================================================== "The Quicker you get Behind, the Longer you have to Catch up."