ChorusOS 5.0 System Administrator's Guide

Name Services and ypbind

Name services make it possible to convert between IP addresses and system names.

The most basic name service solution on a ChorusOS system consists of using the information from the /etc/hosts file, or /etc/networks files.

ChorusOS systems usually rely on other systems to provide name services, however.


Example 13-7 Binding to an NIS Server

The following example configures the NIS daemon for the fictitious an.example.COM domain:


$ rsh target domainname an.example.COM
$ rsh target /sbin/rpcbind&
$ rsh target ypbind

Note that the actors in this example are normally found in a file system outside the system image, such as a root file system located on the host. The domain name must be configured before starting ypbind. As you can see from the example, rpcbind must also be started first, to start ypbind.


ypcat

You can use ypcat(1CC), ypmatch(1CC) and ypwhich(1CC) to obtain information from the NIS database if the ChorusOS system is bound to an NIS domain. See "Name Services and ypbind" for details about binding to the NIS server for the domain.


Example 13-8 Reading NIS Information

The following example uses ypcat to find "demo" networks mentioned in the NIS database:


$ rsh target ypcat networks | grep demo
demo                    129.157.171
demo2                   129.157.176

Note that ypcat, ypmatch and ypwhich require access to the NIS database in order to look up information.