xref: /netbsd-src/usr.sbin/ypserv/ypinit/ypinit.8 (revision 70f7362772ba52b749c976fb5e86e39a8b2c9afc)
1.\"	$NetBSD: ypinit.8,v 1.19 2018/09/25 09:53:40 wiz Exp $
2.\"
3.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Curt J. Sampson.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd February 26, 2005
31.Dt YPINIT 8
32.Os
33.Sh NAME
34.Nm ypinit
35.Nd initialize NIS subsystem
36.Sh SYNOPSIS
37.Nm
38.Fl c
39.Op Fl l Ar server1,...,serverN
40.Op Ar domainname
41.Nm
42.Fl m
43.Op Fl l Ar server1,...,serverN
44.Op Ar domainname
45.Nm
46.Fl s
47.Ar master_server
48.Op Fl l Ar server1,...,serverN
49.Op Ar domainname
50.Sh DESCRIPTION
51.Nm
52initializes the files and directories that are required for a
53.Tn NIS
54client or server.
55.Pp
56If
57.Ar domainname
58isn't specified, the default domain (as returned by
59.Xr domainname 1 )
60is used.
61.Pp
62The following options are available:
63.Bl -tag -width indent
64.It Fl c
65Create a
66.Tn NIS
67client.
68Initializes
69.Pa /var/yp/binding/<domain>.ypservers
70to contain a list of ypservers for
71.Xr ypbind 8
72to connect to.
73.It Fl l Ar server1,...,serverN
74Set the list of client servers from the command line rather than
75prompting for them interactively.
76The format is a comma separated list
77of server names with no spaces.
78.It Fl m
79Create a master
80.Tn NIS
81server.
82Generates map data from local files
83.Pa ( /etc/master.passwd ,
84.Pa /etc/group ,
85etc.).
86.It Fl s Ar master_server
87Create a slave server.
88Downloads the maps from
89.Ar master_server ,
90which should be the active master
91.Tn NIS
92server.
93.El
94.Pp
95To rebuild or refresh the maps for the
96.Tn NIS
97domain <domain>, change to the
98.Pa /var/yp/<domain>
99directory and run
100.Ic make .
101.Sh FILES
102.Bl -tag -width /var/yp/ypserv.log -compact
103.It Pa /var/yp
104master
105.Tn NIS
106directory; contains the template makefiles.
107.It Pa /var/yp/<domain>
108directory to store
109.Tn NIS
110maps for <domain>.
111.It Pa /var/yp/binding/<domain>.ypservers
112list of
113.Tn NIS
114servers to bind to.
115.El
116.Sh SEE ALSO
117.Xr domainname 1 ,
118.Xr make 1 ,
119.Xr makedbm 8 ,
120.Xr mknetid 8 ,
121.Xr nis 8 ,
122.Xr stdethers 8 ,
123.Xr stdhosts 8 ,
124.Xr ypbind 8 ,
125.Xr yppush 8 ,
126.Xr ypserv 8
127.Sh AUTHORS
128.An -nosplit
129Originally written by
130.An Mats O Jansson Aq Mt moj@stacken.kth.se .
131Modified by
132.An Jason R. Thorpe Aq Mt thorpej@NetBSD.org .
133