'\" te
.\"  Copyright 1989 AT&T
.\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH YPINIT 1M "Dec 20, 2007"
.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.
.SH OPTIONS
.sp
.ne 2
.na
\fB\fB-c\fR\fR
.ad
.sp .6
.RS 4n
Set up a \fBypclient\fR system.
.RE

.sp
.ne 2
.na
\fB\fB-m\fR\fR
.ad
.sp .6
.RS 4n
Build a master \fBypserver\fR data base.
.RE

.sp
.ne 2
.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
.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
.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 SEE ALSO
.sp
.LP
\fBsvcs\fR(1), \fBypwhich\fR(1), \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.