Information Technology Reference
In-Depth Information
The following procedure is used to configure an NIS master server. As part
of the procedure, the maps will be built automatically:
1.
Be sure that the system is using the
/etc
files configuration for the
name service switch by copying the
/etc/nsswitch.files
file to the
/etc/nsswitch.conf
file.
2.
Add entries to
/etc/hosts
for each NIS slave server.
3.
If not already done, use the
domainname(1M)
command to set the
domain name.
4.
Run the
ypinit(1M)
command to initialize the NIS master server and
build the maps as shown here:
ypinit -m
5.
Provide the information in response to the prompts from the
ypinit
command. This includes a list of NIS slave servers, and whether the
ypinit
command should exit if an error is encountered.
6.
Enable NIS by copying the
/etc/nsswitch.nis
file to the
/etc/
nsswitch.conf
file.
To start the NIS master server, either reboot the system or run the
ypstart(1M)
command as shown here:
/usr/lib/netsvc/yp/ypstart
NIS Slave Server
A system can be configured as an NIS slave server using the following pro-
cedure. The first four steps are required to configure the slave server as a
client:
1.
Use the
domainname
command to set the domain name.
2.
Update the
/etc/nsswitch.conf
file to use NIS either by copying the
/etc/nsswitch.nis
template file to it or by manually editing the
appropriate configuration.
3.
Log into the system as the root account and run the
ypinit
command
as shown here:
ypinit -c
4.
The
ypinit
command will prompt for one or more NIS servers. Enter
the hostnames of the closest NIS servers. This completes the client
setup.
5.
Add an entry for the NIS master server to the
/etc/hosts
file.