1*86d7f5d3SJohn Marino.\" Copyright (c) 1992/3 Theo de Raadt <deraadt@fsa.ca> 2*86d7f5d3SJohn Marino.\" All rights reserved. 3*86d7f5d3SJohn Marino.\" 4*86d7f5d3SJohn Marino.\" Redistribution and use in source and binary forms, with or without 5*86d7f5d3SJohn Marino.\" modification, are permitted provided that the following conditions 6*86d7f5d3SJohn Marino.\" are met: 7*86d7f5d3SJohn Marino.\" 1. Redistributions of source code must retain the above copyright 8*86d7f5d3SJohn Marino.\" notice, this list of conditions and the following disclaimer. 9*86d7f5d3SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright 10*86d7f5d3SJohn Marino.\" notice, this list of conditions and the following disclaimer in the 11*86d7f5d3SJohn Marino.\" documentation and/or other materials provided with the distribution. 12*86d7f5d3SJohn Marino.\" 3. The name of the author may not be used to endorse or promote 13*86d7f5d3SJohn Marino.\" products derived from this software without specific prior written 14*86d7f5d3SJohn Marino.\" permission. 15*86d7f5d3SJohn Marino.\" 16*86d7f5d3SJohn Marino.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 17*86d7f5d3SJohn Marino.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18*86d7f5d3SJohn Marino.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19*86d7f5d3SJohn Marino.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 20*86d7f5d3SJohn Marino.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21*86d7f5d3SJohn Marino.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22*86d7f5d3SJohn Marino.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23*86d7f5d3SJohn Marino.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24*86d7f5d3SJohn Marino.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25*86d7f5d3SJohn Marino.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26*86d7f5d3SJohn Marino.\" SUCH DAMAGE. 27*86d7f5d3SJohn Marino.\" 28*86d7f5d3SJohn Marino.\" from: @(#)yp.8 1.0 (deraadt) 4/26/93 29*86d7f5d3SJohn Marino.\" $FreeBSD: src/share/man/man8/yp.8,v 1.36 2005/01/21 08:36:40 ru Exp $ 30*86d7f5d3SJohn Marino.\" $DragonFly: src/share/man/man8/yp.8,v 1.5 2006/02/17 19:37:10 swildner Exp $ 31*86d7f5d3SJohn Marino.\" 32*86d7f5d3SJohn Marino.Dd April 5, 1993 33*86d7f5d3SJohn Marino.Dt YP 8 34*86d7f5d3SJohn Marino.Os 35*86d7f5d3SJohn Marino.Sh NAME 36*86d7f5d3SJohn Marino.Nm yp 37*86d7f5d3SJohn Marino.Nd description of the YP/NIS system 38*86d7f5d3SJohn Marino.Sh SYNOPSIS 39*86d7f5d3SJohn Marino.Nm 40*86d7f5d3SJohn Marino.Sh DESCRIPTION 41*86d7f5d3SJohn MarinoThe 42*86d7f5d3SJohn Marino.Nm YP 43*86d7f5d3SJohn Marinosubsystem allows network management of passwd, group, netgroup, hosts, 44*86d7f5d3SJohn Marinoservices, rpc, bootparams and ethers file 45*86d7f5d3SJohn Marinoentries through the functions 46*86d7f5d3SJohn Marino.Xr getpwent 3 , 47*86d7f5d3SJohn Marino.Xr getgrent 3 , 48*86d7f5d3SJohn Marino.Xr getnetgrent 3 , 49*86d7f5d3SJohn Marino.Xr gethostent 3 , 50*86d7f5d3SJohn Marino.Xr getnetent 3 , 51*86d7f5d3SJohn Marino.Xr getrpcent 3 , 52*86d7f5d3SJohn Marinoand 53*86d7f5d3SJohn Marino.Xr ethers 3 . 54*86d7f5d3SJohn MarinoThe 55*86d7f5d3SJohn Marino.Xr bootparamd 8 56*86d7f5d3SJohn Marinodaemon makes direct 57*86d7f5d3SJohn Marino.Tn NIS 58*86d7f5d3SJohn Marinolibrary calls since there are no 59*86d7f5d3SJohn Marinofunctions in the standard C library for reading bootparams. 60*86d7f5d3SJohn Marino.Tn NIS 61*86d7f5d3SJohn Marinosupport is enabled in 62*86d7f5d3SJohn Marino.Xr nsswitch.conf 5 . 63*86d7f5d3SJohn Marino.Pp 64*86d7f5d3SJohn MarinoThe 65*86d7f5d3SJohn Marino.Nm YP 66*86d7f5d3SJohn Marinosubsystem is started automatically in 67*86d7f5d3SJohn Marino.Pa /etc/rc 68*86d7f5d3SJohn Marinoif it has been initialized in 69*86d7f5d3SJohn Marino.Pa /etc/rc.conf 70*86d7f5d3SJohn Marinoand if the directory 71*86d7f5d3SJohn Marino.Pa /var/yp 72*86d7f5d3SJohn Marinoexists (which it does in the default distribution). 73*86d7f5d3SJohn MarinoThe default 74*86d7f5d3SJohn Marino.Tn NIS 75*86d7f5d3SJohn Marinodomain must also be set with the 76*86d7f5d3SJohn Marino.Xr domainname 1 77*86d7f5d3SJohn Marinocommand, which will happen automatically at system startup if it is 78*86d7f5d3SJohn Marinospecified in 79*86d7f5d3SJohn Marino.Pa /etc/rc.conf . 80*86d7f5d3SJohn Marino.Pp 81*86d7f5d3SJohn Marino.Tn NIS 82*86d7f5d3SJohn Marinois an 83*86d7f5d3SJohn Marino.Tn RPC Ns -based 84*86d7f5d3SJohn Marinoclient/server system that allows a group of 85*86d7f5d3SJohn Marinomachines within an 86*86d7f5d3SJohn Marino.Tn NIS 87*86d7f5d3SJohn Marinodomain to share a common set of configuration files. 88*86d7f5d3SJohn MarinoThis permits a system 89*86d7f5d3SJohn Marinoadministrator to set up 90*86d7f5d3SJohn Marino.Tn NIS 91*86d7f5d3SJohn Marinoclient systems with only minimal configuration 92*86d7f5d3SJohn Marinodata and add, remove or modify configuration data from a single location. 93*86d7f5d3SJohn Marino.Pp 94*86d7f5d3SJohn MarinoThe canonical copies of all 95*86d7f5d3SJohn Marino.Tn NIS 96*86d7f5d3SJohn Marinoinformation are stored on a single machine 97*86d7f5d3SJohn Marinocalled the 98*86d7f5d3SJohn Marino.Tn NIS 99*86d7f5d3SJohn Marino.Em "master server" . 100*86d7f5d3SJohn MarinoThe databases used to store the information are called 101*86d7f5d3SJohn Marino.Tn NIS 102*86d7f5d3SJohn Marino.Em maps . 103*86d7f5d3SJohn MarinoIn 104*86d7f5d3SJohn Marino.Dx , 105*86d7f5d3SJohn Marinothese maps are stored in 106*86d7f5d3SJohn Marino.Pa /var/yp/ Ns Aq Ar domainname 107*86d7f5d3SJohn Marinowhere 108*86d7f5d3SJohn Marino.Aq Ar domainname 109*86d7f5d3SJohn Marinois the name of the 110*86d7f5d3SJohn Marino.Tn NIS 111*86d7f5d3SJohn Marinodomain being served. 112*86d7f5d3SJohn MarinoA single 113*86d7f5d3SJohn Marino.Tn NIS 114*86d7f5d3SJohn Marinoserver can 115*86d7f5d3SJohn Marinosupport several domains at once, therefore it is possible to have several 116*86d7f5d3SJohn Marinosuch directories, one for each supported domain. 117*86d7f5d3SJohn MarinoEach domain will have 118*86d7f5d3SJohn Marinoits own independent set of maps. 119*86d7f5d3SJohn Marino.Pp 120*86d7f5d3SJohn MarinoIn 121*86d7f5d3SJohn Marino.Dx , 122*86d7f5d3SJohn Marinothe 123*86d7f5d3SJohn Marino.Tn NIS 124*86d7f5d3SJohn Marinomaps are Berkeley DB hashed database files (the 125*86d7f5d3SJohn Marinosame format used for the 126*86d7f5d3SJohn Marino.Xr passwd 5 127*86d7f5d3SJohn Marinodatabase files). 128*86d7f5d3SJohn MarinoOther operating systems that support 129*86d7f5d3SJohn Marino.Tn NIS 130*86d7f5d3SJohn Marinouse old-style 131*86d7f5d3SJohn Marino.Nm ndbm 132*86d7f5d3SJohn Marinodatabases instead (largely because Sun Microsystems originally based 133*86d7f5d3SJohn Marinotheir 134*86d7f5d3SJohn Marino.Tn NIS 135*86d7f5d3SJohn Marinoimplementation on 136*86d7f5d3SJohn Marino.Nm ndbm , 137*86d7f5d3SJohn Marinoand other vendors have simply licensed 138*86d7f5d3SJohn MarinoSun's code rather than design their own implementation with a different 139*86d7f5d3SJohn Marinodatabase format). 140*86d7f5d3SJohn MarinoOn these systems, the databases are generally split 141*86d7f5d3SJohn Marinointo 142*86d7f5d3SJohn Marino.Pa .dir 143*86d7f5d3SJohn Marinoand 144*86d7f5d3SJohn Marino.Pa .pag 145*86d7f5d3SJohn Marinofiles which the 146*86d7f5d3SJohn Marino.Nm ndbm 147*86d7f5d3SJohn Marinocode uses to hold separate parts of the hash 148*86d7f5d3SJohn Marinodatabase. 149*86d7f5d3SJohn MarinoThe Berkeley DB hash method instead uses a single file for 150*86d7f5d3SJohn Marinoboth pieces of information. 151*86d7f5d3SJohn MarinoThis means that while you may have 152*86d7f5d3SJohn Marino.Pa passwd.byname.dir 153*86d7f5d3SJohn Marinoand 154*86d7f5d3SJohn Marino.Pa passwd.byname.pag 155*86d7f5d3SJohn Marinofiles on other operating systems (both of which are really parts of the 156*86d7f5d3SJohn Marinosame map), 157*86d7f5d3SJohn Marino.Dx 158*86d7f5d3SJohn Marinowill have only one file called 159*86d7f5d3SJohn Marino.Pa passwd.byname . 160*86d7f5d3SJohn MarinoThe difference in format is not significant: only the 161*86d7f5d3SJohn Marino.Tn NIS 162*86d7f5d3SJohn Marinoserver, 163*86d7f5d3SJohn Marino.Xr ypserv 8 , 164*86d7f5d3SJohn Marinoand related tools need to know the database format of the 165*86d7f5d3SJohn Marino.Tn NIS 166*86d7f5d3SJohn Marinomaps. 167*86d7f5d3SJohn MarinoClient 168*86d7f5d3SJohn Marino.Tn NIS 169*86d7f5d3SJohn Marinosystems receive all 170*86d7f5d3SJohn Marino.Tn NIS 171*86d7f5d3SJohn Marinodata in 172*86d7f5d3SJohn Marino.Tn ASCII 173*86d7f5d3SJohn Marinoform. 174*86d7f5d3SJohn Marino.Pp 175*86d7f5d3SJohn MarinoThere are three main types of 176*86d7f5d3SJohn Marino.Tn NIS 177*86d7f5d3SJohn Marinosystems: 178*86d7f5d3SJohn Marino.Bl -enum 179*86d7f5d3SJohn Marino.It 180*86d7f5d3SJohn Marino.Tn NIS 181*86d7f5d3SJohn Marinoclients, 182*86d7f5d3SJohn Marinowhich query 183*86d7f5d3SJohn Marino.Tn NIS 184*86d7f5d3SJohn Marinoservers for information. 185*86d7f5d3SJohn Marino.It 186*86d7f5d3SJohn Marino.Tn NIS 187*86d7f5d3SJohn Marinomaster servers, 188*86d7f5d3SJohn Marinowhich maintain the canonical copies of all 189*86d7f5d3SJohn Marino.Tn NIS 190*86d7f5d3SJohn Marinomaps. 191*86d7f5d3SJohn Marino.It 192*86d7f5d3SJohn Marino.Tn NIS 193*86d7f5d3SJohn Marinoslave servers, 194*86d7f5d3SJohn Marinowhich maintain backup copies of 195*86d7f5d3SJohn Marino.Tn NIS 196*86d7f5d3SJohn Marinomaps that are periodically 197*86d7f5d3SJohn Marinoupdated by the master. 198*86d7f5d3SJohn Marino.El 199*86d7f5d3SJohn Marino.Pp 200*86d7f5d3SJohn MarinoA 201*86d7f5d3SJohn Marino.Tn NIS 202*86d7f5d3SJohn Marinoclient establishes what is called a 203*86d7f5d3SJohn Marino.Em binding 204*86d7f5d3SJohn Marinoto a particular 205*86d7f5d3SJohn Marino.Tn NIS 206*86d7f5d3SJohn Marinoserver using the 207*86d7f5d3SJohn Marino.Xr ypbind 8 208*86d7f5d3SJohn Marinodaemon. 209*86d7f5d3SJohn MarinoThe 210*86d7f5d3SJohn Marino.Xr ypbind 8 211*86d7f5d3SJohn Marinoutility checks the system's default domain (as set by the 212*86d7f5d3SJohn Marino.Xr domainname 1 213*86d7f5d3SJohn Marinocommand) and begins broadcasting 214*86d7f5d3SJohn Marino.Tn RPC 215*86d7f5d3SJohn Marinorequests on the local network. 216*86d7f5d3SJohn MarinoThese requests specify the name of the domain for which 217*86d7f5d3SJohn Marino.Xr ypbind 8 218*86d7f5d3SJohn Marinois attempting to establish a binding. 219*86d7f5d3SJohn MarinoIf a server that has been 220*86d7f5d3SJohn Marinoconfigured to serve the requested domain receives one of the broadcasts, 221*86d7f5d3SJohn Marinoit will respond to 222*86d7f5d3SJohn Marino.Xr ypbind 8 , 223*86d7f5d3SJohn Marinowhich will record the server's address. 224*86d7f5d3SJohn MarinoIf there are several servers 225*86d7f5d3SJohn Marinoavailable (a master and several slaves, for example), 226*86d7f5d3SJohn Marino.Xr ypbind 8 227*86d7f5d3SJohn Marinowill use the address of the first one to respond. 228*86d7f5d3SJohn MarinoFrom that point 229*86d7f5d3SJohn Marinoon, the client system will direct all of its 230*86d7f5d3SJohn Marino.Tn NIS 231*86d7f5d3SJohn Marinorequests to that server. 232*86d7f5d3SJohn MarinoThe 233*86d7f5d3SJohn Marino.Xr ypbind 8 234*86d7f5d3SJohn Marinoutility will occasionally 235*86d7f5d3SJohn Marino.Dq ping 236*86d7f5d3SJohn Marinothe server to make sure it is still up 237*86d7f5d3SJohn Marinoand running. 238*86d7f5d3SJohn MarinoIf it fails to receive a reply to one of its pings 239*86d7f5d3SJohn Marinowithin a reasonable amount of time, 240*86d7f5d3SJohn Marino.Xr ypbind 8 241*86d7f5d3SJohn Marinowill mark the domain as unbound and begin broadcasting again in the 242*86d7f5d3SJohn Marinohopes of locating another server. 243*86d7f5d3SJohn Marino.Pp 244*86d7f5d3SJohn Marino.Tn NIS 245*86d7f5d3SJohn Marinomaster and slave servers handle all 246*86d7f5d3SJohn Marino.Tn NIS 247*86d7f5d3SJohn Marinorequests with the 248*86d7f5d3SJohn Marino.Xr ypserv 8 249*86d7f5d3SJohn Marinodaemon. 250*86d7f5d3SJohn MarinoThe 251*86d7f5d3SJohn Marino.Xr ypserv 8 252*86d7f5d3SJohn Marinoutility is responsible for receiving incoming requests from 253*86d7f5d3SJohn Marino.Tn NIS 254*86d7f5d3SJohn Marinoclients, 255*86d7f5d3SJohn Marinotranslating the requested domain and map name to a path to the 256*86d7f5d3SJohn Marinocorresponding database file and transmitting data from the database 257*86d7f5d3SJohn Marinoback to the client. 258*86d7f5d3SJohn MarinoThere is a specific set of requests that 259*86d7f5d3SJohn Marino.Xr ypserv 8 260*86d7f5d3SJohn Marinois designed to handle, most of which are implemented as functions 261*86d7f5d3SJohn Marinowithin the standard C library: 262*86d7f5d3SJohn Marino.Bl -tag -width ".Fn yp_master" 263*86d7f5d3SJohn Marino.It Fn yp_order 264*86d7f5d3SJohn Marinocheck the creation date of a particular map 265*86d7f5d3SJohn Marino.It Fn yp_master 266*86d7f5d3SJohn Marinoobtain the name of the 267*86d7f5d3SJohn Marino.Tn NIS 268*86d7f5d3SJohn Marinomaster server for a given 269*86d7f5d3SJohn Marinomap/domain 270*86d7f5d3SJohn Marino.It Fn yp_match 271*86d7f5d3SJohn Marinolookup the data corresponding to a given in key in a particular 272*86d7f5d3SJohn Marinomap/domain 273*86d7f5d3SJohn Marino.It Fn yp_first 274*86d7f5d3SJohn Marinoobtain the first key/data pair in a particular map/domain 275*86d7f5d3SJohn Marino.It Fn yp_next 276*86d7f5d3SJohn Marinopass 277*86d7f5d3SJohn Marino.Xr ypserv 8 278*86d7f5d3SJohn Marinoa key in a particular map/domain and have it return the 279*86d7f5d3SJohn Marinokey/data pair immediately following it (the functions 280*86d7f5d3SJohn Marino.Fn yp_first 281*86d7f5d3SJohn Marinoand 282*86d7f5d3SJohn Marino.Fn yp_next 283*86d7f5d3SJohn Marinocan be used to do a sequential search of an 284*86d7f5d3SJohn Marino.Tn NIS 285*86d7f5d3SJohn Marinomap) 286*86d7f5d3SJohn Marino.It Fn yp_all 287*86d7f5d3SJohn Marinoretrieve the entire contents of a map 288*86d7f5d3SJohn Marino.El 289*86d7f5d3SJohn Marino.Pp 290*86d7f5d3SJohn MarinoThere are a few other requests which 291*86d7f5d3SJohn Marino.Xr ypserv 8 292*86d7f5d3SJohn Marinois capable of handling (i.e., acknowledge whether or not you can handle 293*86d7f5d3SJohn Marinoa particular domain 294*86d7f5d3SJohn Marino.Pq Dv YPPROC_DOMAIN , 295*86d7f5d3SJohn Marinoor acknowledge only if you can handle the domain and be silent otherwise 296*86d7f5d3SJohn Marino.Pq Dv YPPROC_DOMAIN_NONACK ) 297*86d7f5d3SJohn Marinobut 298*86d7f5d3SJohn Marinothese requests are usually generated only by 299*86d7f5d3SJohn Marino.Xr ypbind 8 300*86d7f5d3SJohn Marinoand are not meant to be used by standard utilities. 301*86d7f5d3SJohn Marino.Pp 302*86d7f5d3SJohn MarinoOn networks with a large number of hosts, it is often a good idea to 303*86d7f5d3SJohn Marinouse a master server and several slaves rather than just a single master 304*86d7f5d3SJohn Marinoserver. 305*86d7f5d3SJohn MarinoA slave server provides the exact same information as a master 306*86d7f5d3SJohn Marinoserver: whenever the maps on the master server are updated, the new 307*86d7f5d3SJohn Marinodata should be propagated to the slave systems using the 308*86d7f5d3SJohn Marino.Xr yppush 8 309*86d7f5d3SJohn Marinocommand. 310*86d7f5d3SJohn MarinoThe 311*86d7f5d3SJohn Marino.Tn NIS 312*86d7f5d3SJohn Marino.Pa Makefile 313*86d7f5d3SJohn Marino.Pq Pa /var/yp/Makefile 314*86d7f5d3SJohn Marinowill do this automatically if the administrator comments out the 315*86d7f5d3SJohn Marinoline which says 316*86d7f5d3SJohn Marino.Dq Li NOPUSH=true 317*86d7f5d3SJohn Marino.Va ( NOPUSH 318*86d7f5d3SJohn Marinois set to true by default because the default configuration is 319*86d7f5d3SJohn Marinofor a small network with only one 320*86d7f5d3SJohn Marino.Tn NIS 321*86d7f5d3SJohn Marinoserver). 322*86d7f5d3SJohn MarinoThe 323*86d7f5d3SJohn Marino.Xr yppush 8 324*86d7f5d3SJohn Marinocommand will initiate a transaction between the master and slave 325*86d7f5d3SJohn Marinoduring which the slave will transfer the specified maps from the 326*86d7f5d3SJohn Marinomaster server using 327*86d7f5d3SJohn Marino.Xr ypxfr 8 . 328*86d7f5d3SJohn Marino(The slave server calls 329*86d7f5d3SJohn Marino.Xr ypxfr 8 330*86d7f5d3SJohn Marinoautomatically from within 331*86d7f5d3SJohn Marino.Xr ypserv 8 ; 332*86d7f5d3SJohn Marinotherefore it is not usually necessary for the administrator 333*86d7f5d3SJohn Marinoto use it directly. 334*86d7f5d3SJohn MarinoIt can be run manually if 335*86d7f5d3SJohn Marinodesired, however.) 336*86d7f5d3SJohn MarinoMaintaining 337*86d7f5d3SJohn Marinoslave servers helps improve 338*86d7f5d3SJohn Marino.Tn NIS 339*86d7f5d3SJohn Marinoperformance on large 340*86d7f5d3SJohn Marinonetworks by: 341*86d7f5d3SJohn Marino.Bl -bullet 342*86d7f5d3SJohn Marino.It 343*86d7f5d3SJohn MarinoProviding backup services in the event that the 344*86d7f5d3SJohn Marino.Tn NIS 345*86d7f5d3SJohn Marinomaster crashes 346*86d7f5d3SJohn Marinoor becomes unreachable 347*86d7f5d3SJohn Marino.It 348*86d7f5d3SJohn MarinoSpreading the client load out over several machines instead of 349*86d7f5d3SJohn Marinocausing the master to become overloaded 350*86d7f5d3SJohn Marino.It 351*86d7f5d3SJohn MarinoAllowing a single 352*86d7f5d3SJohn Marino.Tn NIS 353*86d7f5d3SJohn Marinodomain to extend beyond 354*86d7f5d3SJohn Marinoa local network 355*86d7f5d3SJohn Marino.Po 356*86d7f5d3SJohn Marinothe 357*86d7f5d3SJohn Marino.Xr ypbind 8 358*86d7f5d3SJohn Marinodaemon might not be able to locate a server automatically if it resides on 359*86d7f5d3SJohn Marinoa network outside the reach of its broadcasts. 360*86d7f5d3SJohn MarinoIt is possible to force 361*86d7f5d3SJohn Marino.Xr ypbind 8 362*86d7f5d3SJohn Marinoto bind to a particular server with 363*86d7f5d3SJohn Marino.Xr ypset 8 364*86d7f5d3SJohn Marinobut this is sometimes inconvenient. 365*86d7f5d3SJohn MarinoThis problem can be avoided simply by 366*86d7f5d3SJohn Marinoplacing a slave server on the local network. 367*86d7f5d3SJohn Marino.Pc 368*86d7f5d3SJohn Marino.El 369*86d7f5d3SJohn Marino.Pp 370*86d7f5d3SJohn MarinoThe 371*86d7f5d3SJohn Marino.Dx 372*86d7f5d3SJohn Marino.Xr ypserv 8 373*86d7f5d3SJohn Marinois specially designed to provide enhanced security 374*86d7f5d3SJohn Marino.Po 375*86d7f5d3SJohn Marinocompared to other 376*86d7f5d3SJohn Marino.Tn NIS 377*86d7f5d3SJohn Marinoimplementations 378*86d7f5d3SJohn Marino.Pc 379*86d7f5d3SJohn Marinowhen used exclusively with 380*86d7f5d3SJohn Marino.Dx 381*86d7f5d3SJohn Marinoand 382*86d7f5d3SJohn Marino.Fx 383*86d7f5d3SJohn Marinoclient 384*86d7f5d3SJohn Marinosystems. 385*86d7f5d3SJohn MarinoThe 386*86d7f5d3SJohn Marino.Dx 387*86d7f5d3SJohn Marinopassword database system (which is derived directly 388*86d7f5d3SJohn Marinofrom 389*86d7f5d3SJohn Marino.Bx 4.4 ) 390*86d7f5d3SJohn Marinoincludes support for 391*86d7f5d3SJohn Marino.Em "shadow passwords" . 392*86d7f5d3SJohn MarinoThe standard password database does not contain users' encrypted 393*86d7f5d3SJohn Marinopasswords: these are instead stored (along with other information) 394*86d7f5d3SJohn Marinoin a separate database which is accessible only by the super-user. 395*86d7f5d3SJohn MarinoIf the encrypted password database were made available as an 396*86d7f5d3SJohn Marino.Tn NIS 397*86d7f5d3SJohn Marinomap, this security feature would be totally disabled, since any user 398*86d7f5d3SJohn Marinois allowed to retrieve 399*86d7f5d3SJohn Marino.Tn NIS 400*86d7f5d3SJohn Marinodata. 401*86d7f5d3SJohn Marino.Pp 402*86d7f5d3SJohn MarinoTo help prevent this, 403*86d7f5d3SJohn Marino.Dx Ns 's 404*86d7f5d3SJohn Marino.Tn NIS 405*86d7f5d3SJohn Marinoserver handles the shadow password maps 406*86d7f5d3SJohn Marino.Pa ( master.passwd.byname 407*86d7f5d3SJohn Marinoand 408*86d7f5d3SJohn Marino.Pa master.passwd.byuid ) 409*86d7f5d3SJohn Marinoin a special way: the server will only provide access to these 410*86d7f5d3SJohn Marinomaps in response to requests that originate on privileged ports. 411*86d7f5d3SJohn MarinoSince only the super-user is allowed to bind to a privileged port, 412*86d7f5d3SJohn Marinothe server assumes that all such requests come from privileged 413*86d7f5d3SJohn Marinousers. 414*86d7f5d3SJohn MarinoAll other requests are denied: requests from non-privileged 415*86d7f5d3SJohn Marinoports will receive only an error code from the server. 416*86d7f5d3SJohn MarinoAdditionally, 417*86d7f5d3SJohn Marino.Dx Ns 's 418*86d7f5d3SJohn Marino.Xr ypserv 8 419*86d7f5d3SJohn Marinoincludes support for 420*86d7f5d3SJohn Marino.An Wietse Venema Ns 's 421*86d7f5d3SJohn Marinotcp wrapper package; with tcp 422*86d7f5d3SJohn Marinowrapper support enabled, the administrator can configure 423*86d7f5d3SJohn Marino.Xr ypserv 8 424*86d7f5d3SJohn Marinoto respond only to selected client machines. 425*86d7f5d3SJohn Marino.Pp 426*86d7f5d3SJohn MarinoWhile these enhancements provide better security than stock 427*86d7f5d3SJohn Marino.Tn NIS , 428*86d7f5d3SJohn Marinothey are by no means 100% effective. 429*86d7f5d3SJohn MarinoIt is still possible for 430*86d7f5d3SJohn Marinosomeone with access to your network to spoof the server into disclosing 431*86d7f5d3SJohn Marinothe shadow password maps. 432*86d7f5d3SJohn Marino.Pp 433*86d7f5d3SJohn MarinoOn the client side, 434*86d7f5d3SJohn Marino.Dx Ns 's 435*86d7f5d3SJohn Marino.Xr getpwent 3 436*86d7f5d3SJohn Marinofunctions will automatically search for the 437*86d7f5d3SJohn Marino.Pa master.passwd 438*86d7f5d3SJohn Marinomaps and use them if they exist. 439*86d7f5d3SJohn MarinoIf they do, they will be used, and 440*86d7f5d3SJohn Marinoall fields in these special maps (class, password age and account 441*86d7f5d3SJohn Marinoexpiration) will be decoded. 442*86d7f5d3SJohn MarinoIf they are not found, the standard 443*86d7f5d3SJohn Marino.Pa passwd 444*86d7f5d3SJohn Marinomaps will be used instead. 445*86d7f5d3SJohn Marino.Sh COMPATIBILITY 446*86d7f5d3SJohn MarinoWhen using a 447*86d7f5d3SJohn Marino.No non- Ns Dx Ns / Ns Fx 448*86d7f5d3SJohn Marino.Tn NIS 449*86d7f5d3SJohn Marinoserver for 450*86d7f5d3SJohn Marino.Xr passwd 5 451*86d7f5d3SJohn Marinofiles, it is unlikely that the default MD5-based format that 452*86d7f5d3SJohn Marino.Dx 453*86d7f5d3SJohn Marinouses for passwords will be accepted by it. 454*86d7f5d3SJohn MarinoIf this is the case, the value of the 455*86d7f5d3SJohn Marino.Va passwd_format 456*86d7f5d3SJohn Marinosetting in 457*86d7f5d3SJohn Marino.Xr login.conf 5 458*86d7f5d3SJohn Marinoshould be changed to 459*86d7f5d3SJohn Marino.Qq Li des 460*86d7f5d3SJohn Marinofor compatibility. 461*86d7f5d3SJohn Marino.Pp 462*86d7f5d3SJohn MarinoSome systems, such as 463*86d7f5d3SJohn Marino.Tn SunOS 464*86d7f5d3SJohn Marino4.x, need 465*86d7f5d3SJohn Marino.Tn NIS 466*86d7f5d3SJohn Marinoto be running in order 467*86d7f5d3SJohn Marinofor their hostname resolution functions 468*86d7f5d3SJohn Marino.Fn ( gethostbyname , 469*86d7f5d3SJohn Marino.Fn gethostbyaddr , 470*86d7f5d3SJohn Marinoetc.) to work properly. 471*86d7f5d3SJohn MarinoOn these systems, 472*86d7f5d3SJohn Marino.Xr ypserv 8 473*86d7f5d3SJohn Marinoperforms 474*86d7f5d3SJohn Marino.Tn DNS 475*86d7f5d3SJohn Marinolookups when asked to return information about 476*86d7f5d3SJohn Marinoa host that does not exist in its 477*86d7f5d3SJohn Marino.Pa hosts.byname 478*86d7f5d3SJohn Marinoor 479*86d7f5d3SJohn Marino.Pa hosts.byaddr 480*86d7f5d3SJohn Marinomaps. 481*86d7f5d3SJohn Marino.Dx Ns 's 482*86d7f5d3SJohn Marinoresolver uses 483*86d7f5d3SJohn Marino.Tn DNS 484*86d7f5d3SJohn Marinoby default (it can be made to use 485*86d7f5d3SJohn Marino.Tn NIS , 486*86d7f5d3SJohn Marinoif desired), therefore its 487*86d7f5d3SJohn Marino.Tn NIS 488*86d7f5d3SJohn Marinoserver does not do 489*86d7f5d3SJohn Marino.Tn DNS 490*86d7f5d3SJohn Marinolookups 491*86d7f5d3SJohn Marinoby default. 492*86d7f5d3SJohn MarinoHowever, 493*86d7f5d3SJohn Marino.Xr ypserv 8 494*86d7f5d3SJohn Marinocan be made to perform 495*86d7f5d3SJohn Marino.Tn DNS 496*86d7f5d3SJohn Marinolookups if it is started with a special 497*86d7f5d3SJohn Marinoflag. 498*86d7f5d3SJohn MarinoIt can also be made to register itself as an 499*86d7f5d3SJohn Marino.Tn NIS 500*86d7f5d3SJohn Marinov1 server 501*86d7f5d3SJohn Marinoin order to placate certain systems that insist on the presence of 502*86d7f5d3SJohn Marinoa v1 server 503*86d7f5d3SJohn Marino.No ( Dx 504*86d7f5d3SJohn Marinouses only 505*86d7f5d3SJohn Marino.Tn NIS 506*86d7f5d3SJohn Marinov2, but many other systems, 507*86d7f5d3SJohn Marinoincluding 508*86d7f5d3SJohn Marino.Tn SunOS 509*86d7f5d3SJohn Marino4.x, search for both a v1 and v2 server when binding). 510*86d7f5d3SJohn Marino.Dx Ns 's 511*86d7f5d3SJohn Marino.Xr ypserv 8 512*86d7f5d3SJohn Marinodoes not actually handle 513*86d7f5d3SJohn Marino.Tn NIS 514*86d7f5d3SJohn Marinov1 requests, but this 515*86d7f5d3SJohn Marino.Dq "kludge mode" 516*86d7f5d3SJohn Marinois useful for silencing stubborn systems that search for both 517*86d7f5d3SJohn Marinoa v1 and v2 server. 518*86d7f5d3SJohn Marino.Pp 519*86d7f5d3SJohn Marino(Please see the 520*86d7f5d3SJohn Marino.Xr ypserv 8 521*86d7f5d3SJohn Marinomanual page for a detailed description of these special features 522*86d7f5d3SJohn Marinoand flags.) 523*86d7f5d3SJohn Marino.Sh HISTORY 524*86d7f5d3SJohn MarinoThe 525*86d7f5d3SJohn Marino.Nm YP 526*86d7f5d3SJohn Marinosubsystem was written from the ground up by 527*86d7f5d3SJohn Marino.An Theo de Raadt 528*86d7f5d3SJohn Marinoto be compatible to Sun's implementation. 529*86d7f5d3SJohn MarinoBug fixes, improvements 530*86d7f5d3SJohn Marinoand 531*86d7f5d3SJohn Marino.Tn NIS 532*86d7f5d3SJohn Marinoserver support were later added by 533*86d7f5d3SJohn Marino.An Bill Paul . 534*86d7f5d3SJohn MarinoThe server-side code was originally written by 535*86d7f5d3SJohn Marino.An Peter Eriksson 536*86d7f5d3SJohn Marinoand 537*86d7f5d3SJohn Marino.An Tobias Reber 538*86d7f5d3SJohn Marinoand is subject to the GNU Public License. 539*86d7f5d3SJohn MarinoNo Sun code was 540*86d7f5d3SJohn Marinoreferenced. 541*86d7f5d3SJohn Marino.Sh BUGS 542*86d7f5d3SJohn MarinoWhile 543*86d7f5d3SJohn Marino.Dx 544*86d7f5d3SJohn Marinonow has both 545*86d7f5d3SJohn Marino.Tn NIS 546*86d7f5d3SJohn Marinoclient and server capabilities, it does not yet have support for 547*86d7f5d3SJohn Marino.Xr ypupdated 8 548*86d7f5d3SJohn Marinoor the 549*86d7f5d3SJohn Marino.Fn yp_update 550*86d7f5d3SJohn Marinofunction. 551*86d7f5d3SJohn MarinoBoth of these require secure 552*86d7f5d3SJohn Marino.Tn RPC , 553*86d7f5d3SJohn Marinowhich 554*86d7f5d3SJohn Marino.Dx 555*86d7f5d3SJohn Marinodoes not 556*86d7f5d3SJohn Marinosupport yet either. 557*86d7f5d3SJohn Marino.Pp 558*86d7f5d3SJohn MarinoThe 559*86d7f5d3SJohn Marino.Xr getservent 3 560*86d7f5d3SJohn Marinoand 561*86d7f5d3SJohn Marino.Xr getprotoent 3 562*86d7f5d3SJohn Marinofunctions do not yet have 563*86d7f5d3SJohn Marino.Tn NIS 564*86d7f5d3SJohn Marinosupport. 565*86d7f5d3SJohn MarinoFortunately, these files 566*86d7f5d3SJohn Marinodo not need to be updated that often. 567*86d7f5d3SJohn Marino.Pp 568*86d7f5d3SJohn MarinoMany more manual pages should be written, especially 569*86d7f5d3SJohn Marino.Xr ypclnt 3 . 570*86d7f5d3SJohn MarinoFor the time being, seek out a local Sun machine and read the 571*86d7f5d3SJohn Marinomanuals for there. 572*86d7f5d3SJohn Marino.Pp 573*86d7f5d3SJohn MarinoNeither Sun nor this author have found a clean way to handle 574*86d7f5d3SJohn Marinothe problems that occur when ypbind cannot find its server 575*86d7f5d3SJohn Marinoupon bootup. 576