'\" te .\" Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. .\" Copyright 1989 AT&T .TH ypinit 1M "1 Jun 2012" "SunOS 5.11" "System Administration Commands" .SH NAME ypinit \- set up NIS client .SH SYNOPSIS .LP .nf \fB/usr/sbin/ypinit\fR [\fB-c\fR] [\fB-m\fR] [\fB-s\fR \fImaster_server\fR] .fi .SH DESCRIPTION .sp .LP \fBypinit\fR can be used to set up an \fBNIS\fR client system. You must be the superuser to run this command. This script need not be used at all if \fBypbind\fR(1M) is started with the \fB-broadcast\fR option (it is invoked with this option from the \fBsvc:/network/nis/client:default service\fR). .sp .LP Normally, \fBypinit\fR is run only once after installing the system. It may be run whenever a new \fBNIS\fR server is added to the network or an existing one is decommissioned. .sp .LP \fBypinit\fR prompts for a list of \fBNIS\fR servers to bind the client to; this list should be ordered from the closest to the furthest server. It is recommended that you list each of these NIS servers by name and numeric IP address in \fB/etc/hosts\fR. Though the practice is not recommended, NIS allows you to list servers by numeric address only, bypassing \fB/etc/hosts\fR. In such a configuration, \fBypwhich\fR(1) returns a numeric address instead of a name. .sp .LP \fBypinit\fR stores the list of servers to which a client can bind in the file \fB/var/yp/binding/\fIdomain\fR/ypservers\fR. This file is used by \fBypbind\fR when run without the \fB-broadcast\fR option. .SS "Interaction with Location Profiles" .sp .LP NIS client configuration is managed in Location profiles (refer to \fBnetcfg\fR(1M) for more information about location profiles). These profiles are either fixed, meaning the network configuration is being managed in the traditional way, or reactive, meaning the network configuration is being managed automatically, reacting to changes in the network environment according to policy rules specified in the profiles. .sp .LP When a fixed location (there can currently be only one, the \fBDefaultFixed\fR location) is active, changes made to the SMF repository will be applied to the location when it is disabled, and thus will be restored if that location is later re-enabled. .sp .LP When a reactive location is active, changes should not be applied directly to the SMF repository; these changes will not be preserved in the location profile, and will thus be lost if the location is disabled, or if the system's network configuration, as managed by \fBsvc:/network/physical:default\fR and \fBsvc:/network/location:default\fR, is refreshed or restarted. Changes should instead be applied to the location itself, using the \fBnetcfg\fR(1M) command; this will save the change to the location profile repository, and will also apply it to the SMF repository (if the change is made to the currently active location). .sp .LP NIS client configuration is stored the \fBdefault-domain\fR and \fBnis-nameservice-servers\fR properties of a location profile. .SH OPTIONS .sp .ne 2 .mk .na \fB\fB-c\fR\fR .ad .sp .6 .RS 4n Set up a \fBypclient\fR system. .RE .sp .ne 2 .mk .na \fB\fB-m\fR\fR .ad .sp .6 .RS 4n Build a master \fBypserver\fR data base. .RE .sp .ne 2 .mk .na \fB\fB-s\fR \fImaster_server\fR\fR .ad .sp .6 .RS 4n Slave data base. \fImaster_server\fR must be the same master configured in the \fBYP\fR maps and returned by the \fBypwhich\fR \fB-m\fR command. .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/etc/hosts\fR\fR .ad .sp .6 .RS 4n File in which it is recommended that NIS servers be listed. .RE .sp .ne 2 .mk .na \fB\fB/var/yp/binding/\fIdomain\fR/ypservers\fR\fR .ad .sp .6 .RS 4n Lists the servers to which the NIS client is allowed to bind. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/network/nis .TE .SH SEE ALSO .sp .LP \fBsvcs\fR(1), \fBypwhich\fR(1), \fBnetcfg\fR(1M), \fBsvcadm\fR(1M), \fBypbind\fR(1M), \fBsysinfo\fR(2), \fBhosts\fR(4), \fBattributes\fR(5), \fBsmf\fR(5) .SH NOTES .sp .LP The \fBNIS client\fR service is managed by the service management facility, \fBsmf\fR(5), under the service identifier: .sp .in +2 .nf svc:/network/nis/client:default .fi .in -2 .sp .sp .LP Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using \fBsvcadm\fR(1M). The service's status can be queried using the \fBsvcs\fR(1) command. .SH BUGS .sp .LP \fBypinit\fR sets up the list of \fBNIS\fR servers only for the current domain on the system when it is run, that is, the domain returned by the \fBSI_SRPC_DOMAIN\fR command to \fBsysinfo\fR(2). Care should be taken to ensure that this is the same as the desired domain for \fBNIS\fR client processes.