del@thrush.mlb.semi.harris.com (Don Lewis) (10/23/90)
In article <7714@dog.ee.lbl.gov> leres@helios.ee.lbl.gov (ucbvax!leres for uucp weenies) writes: >Don Lewis writes: >> If you are posting from the other hosts using the mini-inews supplied >> with nntp and gethostbyname() does not return a fully qualified domain >> name for the current host (as on Suns using YP/NIS), [...] > >If this is your problem then the hosts file you're loading into the yp >map is wrong. The h_name field of the hostnet struct is supposed to be >the official (read canonical) name of the host. This means that you >really want the fully qualified domain name first: > > 128.3.112.36 dog.ee.lbl.gov dog > >it breaks more than the mini-inews if the "alias" appears first. Well, we've been running this way for several years now and mini-inews is all that appears to be broken. I agree that the h_name entry of the hostent struct should be the official name of the host, i.e. it should match hostname(1), but there are problems with making this a fully qualified domain name. Maintaining a host file with both the FQDN and the short version of the name is painful: x.x.x.x thrush.mlb.semi.harris.com thrush Since we are using YP/NIS (no resolver search rules), the alias is necessary so that users don't always have to type the FQDN's. There are host name length restrictions scattered about, so host names get truncated, including all of our local host names. char ut_host[16]; in utmp Programs such as who, finger, and netstat only have a limited space in which to display host names. Putting FQDN's in .rhosts/hosts.equiv is a pain, and greatly adds to the bloat in netgroups. All of the above are either esthetic problems or workarounds are possible, but it was easier for me to just use short names and fix mini-inews. BTW, Sun's documentation only uses short names in /etc/hosts and sunintall does not append the domain name when creating /etc/hosts. Followup to comp.unix.admin. -- Don "Truck" Lewis Harris Semiconductor Internet: del@mlb.semi.harris.com PO Box 883 MS 62A-028 Phone: (407) 729-5205 Melbourne, FL 32901