xref: /freebsd/share/man/man8/yp.8 (revision 1f1dcc1d43867ac3850a206671c24d6cf48d3b54)
1c1d06ca1SGarrett Wollman.\" Copyright (c) 1992/3 Theo de Raadt <deraadt@fsa.ca>
2c1d06ca1SGarrett Wollman.\" All rights reserved.
3c1d06ca1SGarrett Wollman.\"
4c1d06ca1SGarrett Wollman.\" Redistribution and use in source and binary forms, with or without
5c1d06ca1SGarrett Wollman.\" modification, are permitted provided that the following conditions
6c1d06ca1SGarrett Wollman.\" are met:
7c1d06ca1SGarrett Wollman.\" 1. Redistributions of source code must retain the above copyright
8c1d06ca1SGarrett Wollman.\"    notice, this list of conditions and the following disclaimer.
9c1d06ca1SGarrett Wollman.\" 2. Redistributions in binary form must reproduce the above copyright
10c1d06ca1SGarrett Wollman.\"    notice, this list of conditions and the following disclaimer in the
11c1d06ca1SGarrett Wollman.\"    documentation and/or other materials provided with the distribution.
12c1d06ca1SGarrett Wollman.\" 3. The name of the author may not be used to endorse or promote
13c1d06ca1SGarrett Wollman.\"    products derived from this software without specific prior written
14c1d06ca1SGarrett Wollman.\"    permission.
15c1d06ca1SGarrett Wollman.\"
16c1d06ca1SGarrett Wollman.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
17c1d06ca1SGarrett Wollman.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18c1d06ca1SGarrett Wollman.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19c1d06ca1SGarrett Wollman.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20c1d06ca1SGarrett Wollman.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21c1d06ca1SGarrett Wollman.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22c1d06ca1SGarrett Wollman.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23c1d06ca1SGarrett Wollman.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24c1d06ca1SGarrett Wollman.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25c1d06ca1SGarrett Wollman.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26c1d06ca1SGarrett Wollman.\" SUCH DAMAGE.
27c1d06ca1SGarrett Wollman.\"
28c1d06ca1SGarrett Wollman.\"     from: @(#)yp.8	1.0 (deraadt) 4/26/93
297f3dea24SPeter Wemm.\" $FreeBSD$
30c1d06ca1SGarrett Wollman.\"
31c1d06ca1SGarrett Wollman.Dd April 5, 1993
32c1d06ca1SGarrett Wollman.Dt YP 4
33c1d06ca1SGarrett Wollman.Os BSD 4.2
34c1d06ca1SGarrett Wollman.Sh NAME
35c1d06ca1SGarrett Wollman.Nm yp
360c319849SBill Paul.Nd description of the YP/NIS system
37c1d06ca1SGarrett Wollman.Sh SYNOPSIS
384b66483fSRuslan Ermilov.Nm
39c1d06ca1SGarrett Wollman.Sh DESCRIPTION
40c1d06ca1SGarrett WollmanThe
41c1d06ca1SGarrett Wollman.Nm YP
420c319849SBill Paulsubsystem allows network management of passwd, group, netgroup, hosts,
430c319849SBill Paulservices, rpc, bootparams and ethers file
440c319849SBill Paulentries through the functions
450c319849SBill Paul.Xr getpwent 3 ,
460c319849SBill Paul.Xr getgrent 3 ,
470c319849SBill Paul.Xr getnetgrent 3 ,
480c319849SBill Paul.Xr gethostent 3 ,
490c319849SBill Paul.Xr getnetent 3 ,
500c319849SBill Paul.Xr getrpcent 3 ,
510c319849SBill Pauland
520c319849SBill Paul.Xr ethers 3 .
530c319849SBill PaulThe
54edf0e5b3SMike Pritchard.Xr bootparamd 8
5500e68c0dSPhilippe Charnierdaemon makes direct
5600e68c0dSPhilippe Charnier.Tn NIS
5700e68c0dSPhilippe Charnierlibrary calls since there are no
5800e68c0dSPhilippe Charnierfunctions in the standard C library for reading bootparams.
5900e68c0dSPhilippe Charnier.Tn NIS
60248aee62SJacques Vidrinesupport is enabled in
611692a4f1SSheldon Hearn.Xr nsswitch.conf 5 .
620c319849SBill Paul.Pp
63c1d06ca1SGarrett WollmanThe
64c1d06ca1SGarrett Wollman.Nm YP
65c1d06ca1SGarrett Wollmansubsystem is started automatically in
660c319849SBill Paul.Pa /etc/rc
670c319849SBill Paulif it has been initialized in
6830d8a82fSPhilippe Charnier.Pa /etc/rc.conf
690c319849SBill Pauland if the directory
70edf0e5b3SMike Pritchard.Pa /var/yp
710c319849SBill Paulexists (which it does in the default distribution). The default
7200e68c0dSPhilippe Charnier.Tn NIS
7300e68c0dSPhilippe Charnierdomain must also be set with the
740c319849SBill Paul.Xr domainname 1
750c319849SBill Paulcommand, which will happen automatically at system startup if it is
760c319849SBill Paulspecified in
7730d8a82fSPhilippe Charnier.Pa /etc/rc.conf .
780c319849SBill Paul.Pp
7900e68c0dSPhilippe Charnier.Tn NIS
8000e68c0dSPhilippe Charnieris an
8100e68c0dSPhilippe Charnier.Tn RPC Ns -based
8200e68c0dSPhilippe Charnierclient/server system that allows a group of
8300e68c0dSPhilippe Charniermachines within an
8400e68c0dSPhilippe Charnier.Tn NIS
854e86fcacSSheldon Hearndomain to share a common set of configuration files.
864e86fcacSSheldon HearnThis permits a system
8700e68c0dSPhilippe Charnieradministrator to set up
8800e68c0dSPhilippe Charnier.Tn NIS
8900e68c0dSPhilippe Charnierclient systems with only minimal configuration
900c319849SBill Pauldata and add, remove or modify configuration data from a single location.
910c319849SBill Paul.Pp
9200e68c0dSPhilippe CharnierThe canonical copies of all
9300e68c0dSPhilippe Charnier.Tn NIS
9400e68c0dSPhilippe Charnierinformation are stored on a single machine
950c319849SBill Paulcalled the
9600e68c0dSPhilippe Charnier.Em Tn NIS master server .
970c319849SBill PaulThe databases used to store the information are called
9800e68c0dSPhilippe Charnier.Em Tn NIS maps .
99dd5527c6SMike PritchardIn
100b5c508fbSRuslan Ermilov.Fx ,
101dd5527c6SMike Pritchardthese maps are stored in
1020c319849SBill Paul.Pa /var/yp/[domainname]
1030c319849SBill Paulwhere
1040c319849SBill Paul.Pa [domainname]
10500e68c0dSPhilippe Charnieris the name of the
10600e68c0dSPhilippe Charnier.Tn NIS
1074e86fcacSSheldon Hearndomain being served.
1084e86fcacSSheldon HearnA single
10900e68c0dSPhilippe Charnier.Tn NIS
11000e68c0dSPhilippe Charnierserver can
1110c319849SBill Paulsupport several domains at once, therefore it is possible to have several
1124e86fcacSSheldon Hearnsuch directories, one for each supported domain.
1134e86fcacSSheldon HearnEach domain will have
1140c319849SBill Paulits own independent set of maps.
1150c319849SBill Paul.Pp
116dd5527c6SMike PritchardIn
117b5c508fbSRuslan Ermilov.Fx ,
11800e68c0dSPhilippe Charnierthe
11900e68c0dSPhilippe Charnier.Tn NIS
12000e68c0dSPhilippe Charniermaps are Berkeley DB hashed database files (the
1210c319849SBill Paulsame format used for the
1220c319849SBill Paul.Xr passwd 5
12300e68c0dSPhilippe Charnierdatabase files). Other operating systems that support
12400e68c0dSPhilippe Charnier.Tn NIS
12500e68c0dSPhilippe Charnieruse old-style
1260c319849SBill Paulndbm databases instead (largely because Sun Microsystems originally based
12700e68c0dSPhilippe Charniertheir
12800e68c0dSPhilippe Charnier.Tn NIS
12900e68c0dSPhilippe Charnierimplementation on ndbm, and other vendors have simply licensed
1300c319849SBill PaulSun's code rather than design their own implementation with a different
1310c319849SBill Pauldatabase format). On these systems, the databases are generally split
1320c319849SBill Paulinto
1336a6c4c22SMike Pritchard.Em .dir
134c1d06ca1SGarrett Wollmanand
1356a6c4c22SMike Pritchard.Em .pag
1364a8d0283SMike Pritchardfiles which the ndbm code uses to hold separate parts of the hash
1374e86fcacSSheldon Hearndatabase.
1384e86fcacSSheldon HearnThe Berkeley DB hash method instead uses a single file for
1394e86fcacSSheldon Hearnboth pieces of information.
1404e86fcacSSheldon HearnThis means that while you may have
1410c319849SBill Paul.Pa passwd.byname.dir
1420c319849SBill Pauland
1430c319849SBill Paul.Pa passwd.byname.pag
1440c319849SBill Paulfiles on other operating systems (both of which are really parts of the
145dd5527c6SMike Pritchardsame map),
146b5c508fbSRuslan Ermilov.Fx
147dd5527c6SMike Pritchardwill have only one file called
1480c319849SBill Paul.Pa passwd.byname .
1490c319849SBill PaulThe difference in format is not significant: only the
15000e68c0dSPhilippe Charnier.Tn NIS
15100e68c0dSPhilippe Charnierserver,
1520c319849SBill Paul.Xr ypserv 8 ,
15300e68c0dSPhilippe Charnierand related tools need to know the database format of the
15400e68c0dSPhilippe Charnier.Tn NIS
1554e86fcacSSheldon Hearnmaps.
1564e86fcacSSheldon HearnClient
15700e68c0dSPhilippe Charnier.Tn NIS
15800e68c0dSPhilippe Charniersystems receive all
15900e68c0dSPhilippe Charnier.Tn NIS
16000e68c0dSPhilippe Charnierdata in
16100e68c0dSPhilippe Charnier.Tn ASCII
16200e68c0dSPhilippe Charnierform.
1630c319849SBill Paul.Pp
16400e68c0dSPhilippe CharnierThere are three main types of
16500e68c0dSPhilippe Charnier.Tn NIS
16600e68c0dSPhilippe Charniersystems:
1670c319849SBill Paul.Bl -enum -offset indent
1680c319849SBill Paul.It
1691f1dcc1dSRuslan Ermilov.Tn NIS
1701f1dcc1dSRuslan Ermilovclients,
17100e68c0dSPhilippe Charnierwhich query
17200e68c0dSPhilippe Charnier.Tn NIS
17300e68c0dSPhilippe Charnierservers for information.
1740c319849SBill Paul.It
1751f1dcc1dSRuslan Ermilov.Tn NIS
1761f1dcc1dSRuslan Ermilovmaster servers,
17700e68c0dSPhilippe Charnierwhich maintain the canonical copies of all
17800e68c0dSPhilippe Charnier.Tn NIS
17900e68c0dSPhilippe Charniermaps.
1800c319849SBill Paul.It
1811f1dcc1dSRuslan Ermilov.Tn NIS
1821f1dcc1dSRuslan Ermilovslave servers,
18300e68c0dSPhilippe Charnierwhich maintain backup copies of
18400e68c0dSPhilippe Charnier.Tn NIS
18500e68c0dSPhilippe Charniermaps that are periodically
1860c319849SBill Paulupdated by the master.
1870c319849SBill Paul.El
1880c319849SBill Paul.Pp
18900e68c0dSPhilippe CharnierAn
19000e68c0dSPhilippe Charnier.Tn NIS
19100e68c0dSPhilippe Charnierclient establishes what is called a
192edf0e5b3SMike Pritchard.Em binding
19300e68c0dSPhilippe Charnierto a particular
19400e68c0dSPhilippe Charnier.Tn NIS
19500e68c0dSPhilippe Charnierserver using the
1960c319849SBill Paul.Xr ypbind 8
1970c319849SBill Pauldaemon.
1980c319849SBill Paul.Xr Ypbind 8
1990c319849SBill Paulchecks the system's default domain (as set by the
2000c319849SBill Paul.Xr domainname 1
20100e68c0dSPhilippe Charniercommand) and begins broadcasting
20200e68c0dSPhilippe Charnier.Tn RPC
20300e68c0dSPhilippe Charnierrequests on the local network.
2040c319849SBill PaulThese requests specify the name of the domain for which
2050c319849SBill Paul.Xr ypbind 8
2064e86fcacSSheldon Hearnis attempting to establish a binding.
2074e86fcacSSheldon HearnIf a server that has been
2080c319849SBill Paulconfigured to serve the requested domain receives one of the broadcasts,
2090c319849SBill Paulit will respond to
2100c319849SBill Paul.Xr ypbind 8 ,
2114e86fcacSSheldon Hearnwhich will record the server's address.
2124e86fcacSSheldon HearnIf there are several servers
2130c319849SBill Paulavailable (a master and several slaves, for example),
2140c319849SBill Paul.Xr ypbind 8
2154e86fcacSSheldon Hearnwill use the address of the first one to respond.
2164e86fcacSSheldon HearnFrom that point
21700e68c0dSPhilippe Charnieron, the client system will direct all of its
21800e68c0dSPhilippe Charnier.Tn NIS
21900e68c0dSPhilippe Charnierrequests to that server.
2200c319849SBill Paul.Xr Ypbind 8
2210c319849SBill Paulwill occasionally ``ping'' the server to make sure it's still up
2224e86fcacSSheldon Hearnand running.
2234e86fcacSSheldon HearnIf it fails to receive a reply to one of its pings
2244a8d0283SMike Pritchardwithin a reasonable amount of time,
2250c319849SBill Paul.Xr ypbind 8
2260c319849SBill Paulwill mark the domain as unbound and begin broadcasting again in the
2270c319849SBill Paulhopes of locating another server.
2280c319849SBill Paul.Pp
22900e68c0dSPhilippe Charnier.Tn NIS
23000e68c0dSPhilippe Charniermaster and slave servers handle all
23100e68c0dSPhilippe Charnier.Tn NIS
23200e68c0dSPhilippe Charnierrequests with the
2330c319849SBill Paul.Xr ypserv 8
2340c319849SBill Pauldaemon.
2350c319849SBill Paul.Xr Ypserv 8
23600e68c0dSPhilippe Charnieris responsible for receiving incoming requests from
23700e68c0dSPhilippe Charnier.Tn NIS
23800e68c0dSPhilippe Charnierclients,
2390c319849SBill Paultranslating the requested domain and map name to a path to the
2400c319849SBill Paulcorresponding database file and transmitting data from the database
2414e86fcacSSheldon Hearnback to the client.
2424e86fcacSSheldon HearnThere is a specific set of requests that
2430c319849SBill Paul.Xr ypserv 8
2440c319849SBill Paulis designed to handle, most of which are implemented as functions
2450c319849SBill Paulwithin the standard C library:
2460c319849SBill Paul.Bl -bullet -offset indent
2470c319849SBill Paul.It
248edf0e5b3SMike Pritchard.Fn yp_order
2490c319849SBill Paul-- check the creation date of a particular map
2500c319849SBill Paul.It
251edf0e5b3SMike Pritchard.Fn yp_master
25200e68c0dSPhilippe Charnier-- obtain the name of the
25300e68c0dSPhilippe Charnier.Tn NIS
25400e68c0dSPhilippe Charniermaster server for a given
2550c319849SBill Paulmap/domain
2560c319849SBill Paul.It
257edf0e5b3SMike Pritchard.Fn yp_match
2580c319849SBill Paul-- lookup the data corresponding to a given in key in a particular
2590c319849SBill Paulmap/domain
2600c319849SBill Paul.It
261edf0e5b3SMike Pritchard.Fn yp_first
2620c319849SBill Paul-- obtain the first key/data pair in a particular map/domain
2630c319849SBill Paul.It
264edf0e5b3SMike Pritchard.Fn yp_next
2650c319849SBill Paul-- pass
2660c319849SBill Paul.Xr ypserv 8
2670c319849SBill Paula key in a particular map/domain and have it return the
268edf0e5b3SMike Pritchardkey/data pair immediately following it (the functions
269edf0e5b3SMike Pritchard.Fn yp_first
270edf0e5b3SMike Pritchardand
271edf0e5b3SMike Pritchard.Fn yp_next
27200e68c0dSPhilippe Charniercan be used to do a sequential search of an
27300e68c0dSPhilippe Charnier.Tn NIS
27400e68c0dSPhilippe Charniermap)
2750c319849SBill Paul.It
276edf0e5b3SMike Pritchard.Fn yp_all
2774a8d0283SMike Pritchard-- retrieve the entire contents of a map
2780c319849SBill Paul.El
2790c319849SBill Paul.Pp
2800c319849SBill PaulThere are a few other requests which
281edf0e5b3SMike Pritchard.Xr ypserv 8
2820c319849SBill Paulis capable of handling (i.e. acknowledge whether or not you can handle
2830c319849SBill Paula particular domain (YPPROC_DOMAIN), or acknowledge only if you can
2840c319849SBill Paulhandle the domain and be silent otherwise (YPPROC_DOMAIN_NONACK)) but
2850c319849SBill Paulthese requests are usually generated only by
286edf0e5b3SMike Pritchard.Xr ypbind 8
2870c319849SBill Pauland are not meant to be used by standard utilities.
2880c319849SBill Paul.Pp
2890c319849SBill PaulOn networks with a large number of hosts, it is often a good idea to
2900c319849SBill Pauluse a master server and several slaves rather than just a single master
2914e86fcacSSheldon Hearnserver.
2924e86fcacSSheldon HearnA slave server provides the exact same information as a master
2930c319849SBill Paulserver: whenever the maps on the master server are updated, the new
2940c319849SBill Pauldata should be propagated to the slave systems using the
2950c319849SBill Paul.Xr yppush 8
2964e86fcacSSheldon Hearncommand.
2974e86fcacSSheldon HearnThe
29800e68c0dSPhilippe Charnier.Tn NIS
29900e68c0dSPhilippe CharnierMakefile
300dd5527c6SMike Pritchard.Pf ( Pa /var/yp/Makefile )
3010c319849SBill Paulwill do this automatically if the administrator comments out the
3020c319849SBill Paulline which says
3036a6c4c22SMike Pritchard.Em NOPUSH=true
3040c319849SBill Paul(NOPUSH is set to true by default because the default configuration is
30500e68c0dSPhilippe Charnierfor a small network with only one
30600e68c0dSPhilippe Charnier.Tn NIS
30700e68c0dSPhilippe Charnierserver). The
3080c319849SBill Paul.Xr yppush 8
3090c319849SBill Paulcommand will initiate a transaction between the master and slave
3100c319849SBill Paulduring which the slave will transfer the specified maps from the
3110c319849SBill Paulmaster server using
3120c319849SBill Paul.Xr ypxfr 8 .
3130c319849SBill Paul(The slave server calls
3140c319849SBill Paul.Xr ypxfr 8
3150c319849SBill Paulautomatically from within
3160c319849SBill Paul.Xr ypserv 8 ;
3170c319849SBill Paultherefore it is not usually necessary for the administrator
3184e86fcacSSheldon Hearnto use it directly.
3194e86fcacSSheldon HearnIt can be run manually if
3204e86fcacSSheldon Hearndesired, however.)
3214e86fcacSSheldon HearnMaintaining
32200e68c0dSPhilippe Charnierslave servers helps improve
32300e68c0dSPhilippe Charnier.Tn NIS
32400e68c0dSPhilippe Charnierperformance on large
3250c319849SBill Paulnetworks by:
3260c319849SBill Paul.Pp
3270c319849SBill Paul.Bl -bullet -offset indent
3280c319849SBill Paul.It
32900e68c0dSPhilippe CharnierProviding backup services in the event that the
33000e68c0dSPhilippe Charnier.Tn NIS
33100e68c0dSPhilippe Charniermaster crashes
3324a8d0283SMike Pritchardor becomes unreachable
3330c319849SBill Paul.It
3340c319849SBill PaulSpreading the client load out over several machines instead of
3350c319849SBill Paulcausing the master to become overloaded
3360c319849SBill Paul.It
33700e68c0dSPhilippe CharnierAllowing a single
33800e68c0dSPhilippe Charnier.Tn NIS
33900e68c0dSPhilippe Charnierdomain to extend beyond
3400c319849SBill Paula local network (the
3410c319849SBill Paul.Xr ypbind 8
3420c319849SBill Pauldaemon might not be able to locate a server automatically if it resides on
3434e86fcacSSheldon Hearna network outside the reach of its broadcasts.
3444e86fcacSSheldon HearnIt is possible to force
3450c319849SBill Paul.Xr ypbind 8
3460c319849SBill Paulto bind to a particular server with
3470c319849SBill Paul.Xr ypset 8
3484e86fcacSSheldon Hearnbut this is sometimes inconvenient.
3494e86fcacSSheldon HearnThis problem can be avoided simply by
3500c319849SBill Paulplacing a slave server on the local network.)
3510c319849SBill Paul.El
3520c319849SBill Paul.Pp
353dd5527c6SMike PritchardThe
354b5c508fbSRuslan Ermilov.Fx
3550c319849SBill Paul.Xr ypserv 8
3560c319849SBill Paulis specially designed to provided enhanced security (compared to
35700e68c0dSPhilippe Charnierother
35800e68c0dSPhilippe Charnier.Tn NIS
35900e68c0dSPhilippe Charnierimplementations) when used exclusively with
360b5c508fbSRuslan Ermilov.Fx
361dd5527c6SMike Pritchardclient
3624e86fcacSSheldon Hearnsystems.
3634e86fcacSSheldon HearnThe
364b5c508fbSRuslan Ermilov.Fx
365dd5527c6SMike Pritchardpassword database system (which is derived directly
36621421932SMike Pritchardfrom
36721421932SMike Pritchard.Bx 4.4 )
36821421932SMike Pritchardincludes support for
369edf0e5b3SMike Pritchard.Em "shadow passwords" .
3704a8d0283SMike PritchardThe standard password database does not contain users' encrypted
3710c319849SBill Paulpasswords: these are instead stored (along with other information)
3724a8d0283SMike Pritchardis a separate database which is accessible only by the super-user.
37300e68c0dSPhilippe CharnierIf the encrypted password database were made available as an
37400e68c0dSPhilippe Charnier.Tn NIS
3750c319849SBill Paulmap, this security feature would be totally disabled, since any user
37600e68c0dSPhilippe Charnieris allowed to retrieve
37700e68c0dSPhilippe Charnier.Tn NIS
37800e68c0dSPhilippe Charnierdata.
3790c319849SBill Paul.Pp
380dd5527c6SMike PritchardTo help prevent this,
381b5c508fbSRuslan Ermilov.Fx Ns 's
38200e68c0dSPhilippe Charnier.Tn NIS
38300e68c0dSPhilippe Charnierserver handles the shadow password maps
384dd5527c6SMike Pritchard.Pf ( Pa master.passwd.byname
3850c319849SBill Pauland
3860c319849SBill Paul.Pa master.passwd.byuid )
3870c319849SBill Paulin a special way: the server will only provide access to these
3880c319849SBill Paulmaps in response to requests that originate on privileged ports.
3890c319849SBill PaulSince only the super-user is allowed to bind to a privileged port,
3900c319849SBill Paulthe server assumes that all such requests come from privileged
3914e86fcacSSheldon Hearnusers.
3924e86fcacSSheldon HearnAll other requests are denied: requests from non-privileged
3934e86fcacSSheldon Hearnports will receive only an error code from the server.
3944e86fcacSSheldon HearnAdditionally,
395b5c508fbSRuslan Ermilov.Fx Ns 's
3960c319849SBill Paul.Xr ypserv 8
3970c319849SBill Paulincludes support for Wietse Venema's tcp wrapper package; with tcp
3980c319849SBill Paulwrapper support enabled, the administrator can configure
3990c319849SBill Paul.Xr ypserv 8
4000c319849SBill Paulto respond only to selected client machines.
4010c319849SBill Paul.Pp
40200e68c0dSPhilippe CharnierWhile these enhancements provide better security than stock
40300e68c0dSPhilippe Charnier.Tn NIS Ns ,
4044e86fcacSSheldon Hearnthey are by no means 100% effective.
4054e86fcacSSheldon HearnIt is still possible for
4060c319849SBill Paulsomeone with access to your network to spoof the server into disclosing
4070c319849SBill Paulthe shadow password maps.
4080c319849SBill Paul.Pp
409dd5527c6SMike PritchardOn the client side,
410b5c508fbSRuslan Ermilov.Fx Ns 's
4110c319849SBill Paul.Fn getpwent 3
4120c319849SBill Paulfunctions will automatically search for the
4130c319849SBill Paul.Pa master.passwd
4144e86fcacSSheldon Hearnmaps and use them if they exist.
4154e86fcacSSheldon HearnIf they do, they will be used, and
4160c319849SBill Paulall fields in these special maps (class, password age and account
4174e86fcacSSheldon Hearnexpiration) will be decoded.
4184e86fcacSSheldon HearnIf they aren't found, the standard
4190c319849SBill Paul.Pa passwd
4200c319849SBill Paulmaps will be used instead.
4210c319849SBill Paul.Sh COMPATIBILITY
422b5c508fbSRuslan ErmilovWhen using a
423b5c508fbSRuslan Ermilov.No non- Ns Fx
424b5c508fbSRuslan ErmilovNIS server for
425d29b3051SBrian Feldman.Xr passwd 5
426b5c508fbSRuslan Ermilovfiles, it is unlikely that the default MD5-based format that
427b5c508fbSRuslan Ermilov.Fx
428d29b3051SBrian Feldmanuses for passwords will be accepted by it.
429d29b3051SBrian FeldmanIf this is the case, the value of the "passwd_format" setting in
430d29b3051SBrian Feldman.Xr login.conf 5
431d29b3051SBrian Feldmanshould be changed to "des" for compatibility.
432d29b3051SBrian Feldman.Pp
43300e68c0dSPhilippe CharnierSome systems, such as SunOS 4.x, need
43400e68c0dSPhilippe Charnier.Tn NIS
43500e68c0dSPhilippe Charnierto be running in order
4360c319849SBill Paulfor their hostname resolution functions (
4370c319849SBill Paul.Fn gethostbyname ,
4380c319849SBill Paul.Fn gethostbyaddr ,
4394e86fcacSSheldon Hearnetc) to work properly.
4404e86fcacSSheldon HearnOn these systems,
4410c319849SBill Paul.Xr ypserv 8
44200e68c0dSPhilippe Charnierperforms
44300e68c0dSPhilippe Charnier.Tn DNS
44400e68c0dSPhilippe Charnierlookups when asked to return information about
4450c319849SBill Paula host that doesn't exist in its
4460c319849SBill Paul.Pa hosts.byname
4470c319849SBill Paulor
4480c319849SBill Paul.Pa hosts.byaddr
449dd5527c6SMike Pritchardmaps.
450b5c508fbSRuslan Ermilov.Fx Ns 's
45100e68c0dSPhilippe Charnierresolver uses
45200e68c0dSPhilippe Charnier.Tn DNS
45300e68c0dSPhilippe Charnierby default (it can be made to use
45400e68c0dSPhilippe Charnier.Tn NIS Ns ,
45500e68c0dSPhilippe Charnierif desired), therefore its
45600e68c0dSPhilippe Charnier.Tn NIS
45700e68c0dSPhilippe Charnierserver doesn't do
45810edb738SNik Clayton.Tn DNS
45900e68c0dSPhilippe Charnierlookups
4604e86fcacSSheldon Hearnby default.
4614e86fcacSSheldon HearnHowever,
4620c319849SBill Paul.Xr ypserv 8
46300e68c0dSPhilippe Charniercan be made to perform
46400e68c0dSPhilippe Charnier.Tn DNS
46500e68c0dSPhilippe Charnierlookups if it is started with a special
4664e86fcacSSheldon Hearnflag.
4674e86fcacSSheldon HearnIt can also be made to register itself as an
46800e68c0dSPhilippe Charnier.Tn NIS
46900e68c0dSPhilippe Charnierv1 server
4700c319849SBill Paulin order to placate certain systems that insist on the presence of
471dd5527c6SMike Pritcharda v1 server
472b5c508fbSRuslan Ermilov.No ( Fx
47300e68c0dSPhilippe Charnieruses only
47400e68c0dSPhilippe Charnier.Tn NIS
47500e68c0dSPhilippe Charnierv2, but many other systems,
476dd5527c6SMike Pritchardincluding
477dd5527c6SMike Pritchard.Tn SunOS
478dd5527c6SMike Pritchard4.x, search for both a v1 and v2 server when binding).
479b5c508fbSRuslan Ermilov.Fx Ns 's
4800c319849SBill Paul.Xr ypserv 8
48100e68c0dSPhilippe Charnierdoes not actually handle
48200e68c0dSPhilippe Charnier.Tn NIS
48300e68c0dSPhilippe Charnierv1 requests, but this ``kludge mode''
4840c319849SBill Paulis useful for silencing stubborn systems that search for both
4850c319849SBill Paula v1 and v2 server.
4860c319849SBill Paul.Pp
4870c319849SBill Paul(Please see the
4880c319849SBill Paul.Xr ypserv 8
4890c319849SBill Paulmanual page for a detailed description of these special features
4900c319849SBill Pauland flags.)
4910c319849SBill Paul.Sh BUGS
492dd5527c6SMike PritchardWhile
493b5c508fbSRuslan Ermilov.Fx
49400e68c0dSPhilippe Charniernow has both
49500e68c0dSPhilippe Charnier.Tn NIS
49600e68c0dSPhilippe Charnierclient and server capabilities, it does not yet have support for
4976a6c4c22SMike Pritchard.Xr ypupdated 8
4980c319849SBill Paulor the
4990c319849SBill Paul.Fn yp_update
5004e86fcacSSheldon Hearnfunction.
5014e86fcacSSheldon HearnBoth of these require secure
50200e68c0dSPhilippe Charnier.Tn RPC Ns ,
50300e68c0dSPhilippe Charnierwhich
504b5c508fbSRuslan Ermilov.Fx
505dd5527c6SMike Pritcharddoesn't
5060c319849SBill Paulsupport yet either.
5070c319849SBill Paul.Pp
5080c319849SBill PaulThe
5090c319849SBill Paul.Xr getservent 3
5100c319849SBill Pauland
5110c319849SBill Paul.Xr getprotoent 3
51200e68c0dSPhilippe Charnierfunctions do not yet have
51300e68c0dSPhilippe Charnier.Tn NIS
5144e86fcacSSheldon Hearnsupport.
5154e86fcacSSheldon HearnFortunately, these files
5160c319849SBill Pauldon't need to be updated that often.
5170c319849SBill Paul.Pp
518edf0e5b3SMike PritchardMany more manual pages should be written, especially
519edf0e5b3SMike Pritchard.Xr ypclnt 3 .
520c1d06ca1SGarrett WollmanFor the time being, seek out a local Sun machine and read the
521c1d06ca1SGarrett Wollmanmanuals for there.
5220c319849SBill Paul.Pp
523c1d06ca1SGarrett WollmanNeither Sun nor this author have found a clean way to handle
524c1d06ca1SGarrett Wollmanthe problems that occur when ypbind cannot find its server
525c1d06ca1SGarrett Wollmanupon bootup.
526c1d06ca1SGarrett Wollman.Sh HISTORY
527c1d06ca1SGarrett WollmanThe
528c1d06ca1SGarrett Wollman.Nm YP
52900e68c0dSPhilippe Charniersubsystem was written from the ground up by
53000e68c0dSPhilippe Charnier.An Theo de Raadt
5314e86fcacSSheldon Hearnto be compatible to Sun's implementation.
5324e86fcacSSheldon HearnBug fixes, improvements
53300e68c0dSPhilippe Charnierand
53400e68c0dSPhilippe Charnier.Tn NIS
53500e68c0dSPhilippe Charnierserver support were later added by
53600e68c0dSPhilippe Charnier.An Bill Paul Ns .
53700e68c0dSPhilippe CharnierThe server-side code was originally written by
53800e68c0dSPhilippe Charnier.An Peter Eriksson
53900e68c0dSPhilippe Charnierand
54000e68c0dSPhilippe Charnier.An Tobias Reber
5414e86fcacSSheldon Hearnand is subject to the GNU Public License.
5424e86fcacSSheldon HearnNo Sun code was
543c1d06ca1SGarrett Wollmanreferenced.
544