1.\" $OpenBSD: yp.8,v 1.31 2013/07/15 22:59:13 schwarze 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: July 15 2013 $ 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.Pp 106.Nm rpc.yppasswdd 107.Bk -words 108.Op Fl nogecos 109.Op Fl nopw 110.Op Fl noshell 111.Op Fl d Ar directory 112.Op Fl m Ar arg ... 113.Ek 114.Sh DESCRIPTION 115The 116.Nm YP 117subsystem allows network management of passwd, group, and 118hosts file entries through the functions 119.Xr getpwent 3 , 120.Xr getgrent 3 121and 122.Xr gethostbyname 3 . 123A number of other databases can be network-managed as well, 124and have their respective functions. 125.Nm YP 126also provides hooks for numerous other client programs 127such as 128.Xr amd 8 129and 130.Xr bootparamd 8 131to access distributed and shareable versions 132of their maps through 133.Nm YP . 134The YP subsystem requires that 135.Xr portmap 8 136be running, since the entire subsystem uses the RPC subsystem. 137.Pp 138.Nm ypinit 139is used to initialize 140.Nm YP 141as a master or a slave. 142This creates various files in 143.Pa /var/yp . 144After running 145.Nm ypinit Fl m , 146optionally edit 147.Pa /var/yp/DOMAINNAME/Makefile 148to change settings, for example to switch from the default 149backwards compatible mode to secure mode. 150Finally, always run 151.Xr make 1 152in 153.Pa /var/yp . 154See 155.Xr Makefile.yp 8 156for details. 157.Pp 158If set up as a slave, the required databases are automatically copied 159from the specified server. 160.Pp 161The 162.Nm YP 163client subsystem is started automatically in 164.Pa /etc/rc 165if the directory 166.Pa /var/yp/binding 167exists. 168The client subsystem can be turned on and off by creating or 169deleting that directory. 170.Xr ypbind 8 171will create that directory if run by hand. 172.Pp 173The 174.Nm YP 175server subsystem is started automatically in 176.Pa /etc/rc 177if the directory 178.Pa /var/yp/DOMAINNAME 179exists. 180This directory is automatically created by 181.Xr ypinit 8 182(which initializes the machine as a 183.Nm YP 184server). 185.Pp 186If 187.Nm ypbind 188cannot find a server, the system behaves the same way as Sun's code 189does: it hangs. 190.Sh FILES 191.Bl -tag -width /var/yp/Makefile.main -compact 192.It Pa /var/yp/Makefile.main 193Top level YP Makefile 194.It Pa /var/yp/Makefile.yp 195YP maps Makefile 196.El 197.Sh SEE ALSO 198.Xr domainname 1 , 199.Xr ypcat 1 , 200.Xr ypmatch 1 , 201.Xr ypwhich 1 , 202.Xr ypclnt 3 , 203.Xr defaultdomain 5 , 204.Xr group 5 , 205.Xr passwd 5 , 206.Xr resolv.conf 5 , 207.Xr Makefile.yp 8 , 208.Xr portmap 8 , 209.Xr rpc.yppasswdd 8 , 210.Xr ypbind 8 , 211.Xr ypinit 8 , 212.Xr yppoll 8 , 213.Xr yppush 8 , 214.Xr ypserv 8 , 215.Xr ypset 8 , 216.Xr ypxfr 8 217.Sh HISTORY 218This free 219.Nm YP 220subsystem is thought to be compatible with Sun's implementation. 221It is, of course, not compatible with 222.Nm NIS+ 223or any other 224.Dq secure 225.Nm YP 226subsystem other than the native one. 227.Pp 228The name 229.Nm YP 230stands for Yellow Pee. 231.Pp 232The ypbind, most library components, and userland programs were implemented 233by 234.An Theo de Raadt Aq Mt deraadt@theos.com . 235The current 236.Xr getpwent 3 237implementation was done by 238.An Jason Downs Aq Mt downsj@downsj.com . 239The server component was implemented by 240.An Mats O Jansson Aq Mt moj@stacken.kth.se . 241