xref: /openbsd-src/share/man/man8/yp.8 (revision ffa6640bce11e952f830de2f066b27f7128e3ca7)
1.\"	$OpenBSD: yp.8,v 1.34 2022/09/27 13:30:36 kn Exp $
2.\"	$NetBSD: yp.8,v 1.9 1995/08/11 01:16:52 thorpej Exp $
3.\"
4.\" Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com>
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
17.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd $Mdocdate: September 27 2022 $
29.Dt YP 8
30.Os
31.Sh NAME
32.Nm yp
33.Nd description of the YP subsystem
34.Sh SYNOPSIS
35.Nm ypinit
36.Fl m Op Ar domainname
37.Nm ypinit
38.Fl s Ar master_server Op Ar domainname
39.Nm ypinit
40.Fl u Op Ar domainname
41.Pp
42.Nm ypbind
43.Op Fl insecure
44.Op Fl ypset
45.Op Fl ypsetme
46.Pp
47.Nm ypset
48.Op Fl d Ar domain
49.Op Fl h Ar host
50.Ar server
51.Pp
52.Nm yppoll
53.Op Fl d Ar domain
54.Op Fl h Ar host
55.Ar mapname
56.Pp
57.Nm ypcat
58.Op Fl kt
59.Op Fl d Ar domainname
60.Ar mapname
61.Nm ypcat
62.Fl x
63.Pp
64.Nm ypmatch
65.Op Fl kt
66.Op Fl d Ar domainname
67.Ar key ... mapname
68.Nm ypmatch
69.Fl x
70.Pp
71.Nm ypwhich
72.Op Fl t
73.Op Fl d Ar domain
74.Oo
75.Op Fl h
76.Ar host
77.Oc
78.Nm ypwhich
79.Op Fl t
80.Op Fl d Ar domain
81.Op Fl h Ar host
82.Fl m Op Ar mname
83.Nm ypwhich
84.Fl x
85.Pp
86.Nm ypserv
87.Op Fl 1dx
88.Op Fl a Ar aclfile
89.Pp
90.Nm ypxfr
91.Op Fl cf
92.Op Fl C Ar tid prog ipadd port
93.Op Fl d Ar domain
94.Op Fl h Ar host
95.Op Fl s Ar domain
96.Ar mapname
97.Pp
98.Nm yppush
99.Op Fl v
100.Op Fl d Ar domainname
101.Op Fl h Ar hostname
102.\" .Op Fl p Ar paralleljobs
103.\" .Op Fl t Ar timeout
104.Ar mapname
105.Sh DESCRIPTION
106The
107.Nm YP
108subsystem allows network management of passwd, group, and
109hosts file entries through the functions
110.Xr getpwent 3 ,
111.Xr getgrent 3
112and
113.Xr gethostbyname 3 .
114A number of other databases can be network-managed as well,
115and have their respective functions.
116.Nm YP
117also provides hooks for numerous other client programs
118such as
119.Xr amd 8
120and
121.Xr rpc.bootparamd 8
122to access distributed and shareable versions
123of their maps through
124.Nm YP .
125The YP subsystem requires that
126.Xr portmap 8
127be running, since the entire subsystem uses the RPC subsystem.
128.Pp
129.Nm ypinit
130is used to initialize
131.Nm YP
132as a master or a slave.
133This creates various files in
134.Pa /var/yp .
135After running
136.Nm ypinit Fl m ,
137optionally edit
138.Pa /var/yp/DOMAINNAME/Makefile
139to change settings, for example to switch from the default
140backwards compatible mode to secure mode.
141Finally, always run
142.Xr make 1
143in
144.Pa /var/yp .
145See
146.Xr Makefile.yp 8
147for details.
148.Pp
149If set up as a slave, the required databases are automatically copied
150from the specified server.
151.Pp
152The
153.Nm YP
154client subsystem is started automatically in
155.Pa /etc/rc
156if the directory
157.Pa /var/yp/binding
158exists.
159The client subsystem can be turned on and off by creating or
160deleting that directory.
161.Xr ypbind 8
162will create that directory if run by hand.
163.Pp
164The
165.Nm YP
166server subsystem is started automatically in
167.Pa /etc/rc
168if the directory
169.Pa /var/yp/DOMAINNAME
170exists.
171This directory is automatically created by
172.Xr ypinit 8
173(which initializes the machine as a
174.Nm YP
175server).
176.Pp
177If
178.Nm ypbind
179cannot find a server, the system behaves the same way as Sun's code
180does: it hangs.
181.Sh FILES
182.Bl -tag -width /var/yp/Makefile.main -compact
183.It Pa /var/yp/Makefile.main
184Top level YP Makefile
185.It Pa /var/yp/Makefile.yp
186YP maps Makefile
187.El
188.Sh SEE ALSO
189.Xr domainname 1 ,
190.Xr ypcat 1 ,
191.Xr ypmatch 1 ,
192.Xr ypwhich 1 ,
193.Xr yp_bind 3 ,
194.Xr defaultdomain 5 ,
195.Xr group 5 ,
196.Xr passwd 5 ,
197.Xr resolv.conf 5 ,
198.Xr Makefile.yp 8 ,
199.Xr portmap 8 ,
200.Xr ypbind 8 ,
201.Xr ypinit 8 ,
202.Xr yppoll 8 ,
203.Xr yppush 8 ,
204.Xr ypserv 8 ,
205.Xr ypset 8 ,
206.Xr ypxfr 8
207.Sh HISTORY
208This free
209.Nm YP
210subsystem is thought to be compatible with Sun's implementation.
211It is, of course, not compatible with
212.Nm NIS+
213or any other
214.Dq secure
215.Nm YP
216subsystem other than the native one.
217.Pp
218The name
219.Nm YP
220stands for Yellow Pee.
221.Pp
222The ypbind, most library components, and userland programs were implemented
223by
224.An Theo de Raadt Aq Mt deraadt@theos.com .
225The current
226.Xr getpwent 3
227implementation was done by
228.An Jason Downs Aq Mt downsj@downsj.com .
229The server component was implemented by
230.An Mats O Jansson Aq Mt moj@stacken.kth.se .
231