Host Names
By default, NIS only uses the /etc/hosts file to build the hosts map. If you have configured a domain name server in your network, you can configure NIS to include domain name system (DNS) information as well as /etc/hosts information in the hosts map. (Including DNS information in the hosts map eliminates re-entering all this information in the /etc/hosts file.) To do so, use an editor to change the /var/yp/Makefile file as follows:
- Locate the hosts.time stanza in the /var/yp/Makefile file.
- Change the two lines containing the word MAKEDBM:
so that they look like:... | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/hosts.byname; \ ... | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/hosts.byaddr; \ ...
In other words, add the -b flag, with a space before and after, to both lines.... | $(MAKEDBM) -b - $(YPDBDIR)/$(DOM)/hosts.byname; \ ... | $(MAKEDBM) -b - $(YPDBDIR)/$(DOM)/hosts.byaddr; \ ...
The ypserv and ypxfrd daemons use the file /var/yp/securenets, if it exists, and only respond to the IP addresses listed in the netmask netaddr pairs within that file.