xref: /freebsd/share/man/man8/yp.8 (revision 491a8429624c0cf6c17e6e0b80d6a09e3b347984)
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
32491a8429SRuslan Ermilov.Dt YP 8
333d45e180SRuslan Ermilov.Os
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
71e6676766SRuslan Ermilovexists (which it does in the default distribution).
72e6676766SRuslan ErmilovThe default
7300e68c0dSPhilippe Charnier.Tn NIS
7400e68c0dSPhilippe Charnierdomain must also be set with the
750c319849SBill Paul.Xr domainname 1
760c319849SBill Paulcommand, which will happen automatically at system startup if it is
770c319849SBill Paulspecified in
7830d8a82fSPhilippe Charnier.Pa /etc/rc.conf .
790c319849SBill Paul.Pp
8000e68c0dSPhilippe Charnier.Tn NIS
8100e68c0dSPhilippe Charnieris an
8200e68c0dSPhilippe Charnier.Tn RPC Ns -based
8300e68c0dSPhilippe Charnierclient/server system that allows a group of
8400e68c0dSPhilippe Charniermachines within an
8500e68c0dSPhilippe Charnier.Tn NIS
864e86fcacSSheldon Hearndomain to share a common set of configuration files.
874e86fcacSSheldon HearnThis permits a system
8800e68c0dSPhilippe Charnieradministrator to set up
8900e68c0dSPhilippe Charnier.Tn NIS
9000e68c0dSPhilippe Charnierclient systems with only minimal configuration
910c319849SBill Pauldata and add, remove or modify configuration data from a single location.
920c319849SBill Paul.Pp
9300e68c0dSPhilippe CharnierThe canonical copies of all
9400e68c0dSPhilippe Charnier.Tn NIS
9500e68c0dSPhilippe Charnierinformation are stored on a single machine
960c319849SBill Paulcalled the
97e6676766SRuslan Ermilov.Tn NIS
98e6676766SRuslan Ermilov.Em "master server" .
990c319849SBill PaulThe databases used to store the information are called
100e6676766SRuslan Ermilov.Tn NIS
101e6676766SRuslan Ermilov.Em maps .
102dd5527c6SMike PritchardIn
103b5c508fbSRuslan Ermilov.Fx ,
104dd5527c6SMike Pritchardthese maps are stored in
105e6676766SRuslan Ermilov.Pa /var/yp/ Ns Aq Ar domainname
1060c319849SBill Paulwhere
107e6676766SRuslan Ermilov.Aq Ar domainname
10800e68c0dSPhilippe Charnieris the name of the
10900e68c0dSPhilippe Charnier.Tn NIS
1104e86fcacSSheldon Hearndomain being served.
1114e86fcacSSheldon HearnA single
11200e68c0dSPhilippe Charnier.Tn NIS
11300e68c0dSPhilippe Charnierserver can
1140c319849SBill Paulsupport several domains at once, therefore it is possible to have several
1154e86fcacSSheldon Hearnsuch directories, one for each supported domain.
1164e86fcacSSheldon HearnEach domain will have
1170c319849SBill Paulits own independent set of maps.
1180c319849SBill Paul.Pp
119dd5527c6SMike PritchardIn
120b5c508fbSRuslan Ermilov.Fx ,
12100e68c0dSPhilippe Charnierthe
12200e68c0dSPhilippe Charnier.Tn NIS
12300e68c0dSPhilippe Charniermaps are Berkeley DB hashed database files (the
1240c319849SBill Paulsame format used for the
1250c319849SBill Paul.Xr passwd 5
126e6676766SRuslan Ermilovdatabase files).
127e6676766SRuslan ErmilovOther operating systems that support
12800e68c0dSPhilippe Charnier.Tn NIS
12900e68c0dSPhilippe Charnieruse old-style
130e6676766SRuslan Ermilov.Nm ndbm
131e6676766SRuslan Ermilovdatabases instead (largely because Sun Microsystems originally based
13200e68c0dSPhilippe Charniertheir
13300e68c0dSPhilippe Charnier.Tn NIS
134e6676766SRuslan Ermilovimplementation on
135e6676766SRuslan Ermilov.Nm ndbm ,
136e6676766SRuslan Ermilovand other vendors have simply licensed
1370c319849SBill PaulSun's code rather than design their own implementation with a different
138e6676766SRuslan Ermilovdatabase format).
139e6676766SRuslan ErmilovOn these systems, the databases are generally split
1400c319849SBill Paulinto
141e6676766SRuslan Ermilov.Pa .dir
142c1d06ca1SGarrett Wollmanand
143e6676766SRuslan Ermilov.Pa .pag
144e6676766SRuslan Ermilovfiles which the
145e6676766SRuslan Ermilov.Nm ndbm
146e6676766SRuslan Ermilovcode uses to hold separate parts of the hash
1474e86fcacSSheldon Hearndatabase.
1484e86fcacSSheldon HearnThe Berkeley DB hash method instead uses a single file for
1494e86fcacSSheldon Hearnboth pieces of information.
1504e86fcacSSheldon HearnThis means that while you may have
1510c319849SBill Paul.Pa passwd.byname.dir
1520c319849SBill Pauland
1530c319849SBill Paul.Pa passwd.byname.pag
1540c319849SBill Paulfiles on other operating systems (both of which are really parts of the
155dd5527c6SMike Pritchardsame map),
156b5c508fbSRuslan Ermilov.Fx
157dd5527c6SMike Pritchardwill have only one file called
1580c319849SBill Paul.Pa passwd.byname .
1590c319849SBill PaulThe difference in format is not significant: only the
16000e68c0dSPhilippe Charnier.Tn NIS
16100e68c0dSPhilippe Charnierserver,
1620c319849SBill Paul.Xr ypserv 8 ,
16300e68c0dSPhilippe Charnierand related tools need to know the database format of the
16400e68c0dSPhilippe Charnier.Tn NIS
1654e86fcacSSheldon Hearnmaps.
1664e86fcacSSheldon HearnClient
16700e68c0dSPhilippe Charnier.Tn NIS
16800e68c0dSPhilippe Charniersystems receive all
16900e68c0dSPhilippe Charnier.Tn NIS
17000e68c0dSPhilippe Charnierdata in
17100e68c0dSPhilippe Charnier.Tn ASCII
17200e68c0dSPhilippe Charnierform.
1730c319849SBill Paul.Pp
17400e68c0dSPhilippe CharnierThere are three main types of
17500e68c0dSPhilippe Charnier.Tn NIS
17600e68c0dSPhilippe Charniersystems:
177e6676766SRuslan Ermilov.Bl -enum
1780c319849SBill Paul.It
1791f1dcc1dSRuslan Ermilov.Tn NIS
1801f1dcc1dSRuslan Ermilovclients,
18100e68c0dSPhilippe Charnierwhich query
18200e68c0dSPhilippe Charnier.Tn NIS
18300e68c0dSPhilippe Charnierservers for information.
1840c319849SBill Paul.It
1851f1dcc1dSRuslan Ermilov.Tn NIS
1861f1dcc1dSRuslan Ermilovmaster servers,
18700e68c0dSPhilippe Charnierwhich maintain the canonical copies of all
18800e68c0dSPhilippe Charnier.Tn NIS
18900e68c0dSPhilippe Charniermaps.
1900c319849SBill Paul.It
1911f1dcc1dSRuslan Ermilov.Tn NIS
1921f1dcc1dSRuslan Ermilovslave servers,
19300e68c0dSPhilippe Charnierwhich maintain backup copies of
19400e68c0dSPhilippe Charnier.Tn NIS
19500e68c0dSPhilippe Charniermaps that are periodically
1960c319849SBill Paulupdated by the master.
1970c319849SBill Paul.El
1980c319849SBill Paul.Pp
199e6676766SRuslan ErmilovA
20000e68c0dSPhilippe Charnier.Tn NIS
20100e68c0dSPhilippe Charnierclient establishes what is called a
202edf0e5b3SMike Pritchard.Em binding
20300e68c0dSPhilippe Charnierto a particular
20400e68c0dSPhilippe Charnier.Tn NIS
20500e68c0dSPhilippe Charnierserver using the
2060c319849SBill Paul.Xr ypbind 8
2070c319849SBill Pauldaemon.
2080c319849SBill Paul.Xr Ypbind 8
2090c319849SBill Paulchecks the system's default domain (as set by the
2100c319849SBill Paul.Xr domainname 1
21100e68c0dSPhilippe Charniercommand) and begins broadcasting
21200e68c0dSPhilippe Charnier.Tn RPC
21300e68c0dSPhilippe Charnierrequests on the local network.
2140c319849SBill PaulThese requests specify the name of the domain for which
2150c319849SBill Paul.Xr ypbind 8
2164e86fcacSSheldon Hearnis attempting to establish a binding.
2174e86fcacSSheldon HearnIf a server that has been
2180c319849SBill Paulconfigured to serve the requested domain receives one of the broadcasts,
2190c319849SBill Paulit will respond to
2200c319849SBill Paul.Xr ypbind 8 ,
2214e86fcacSSheldon Hearnwhich will record the server's address.
2224e86fcacSSheldon HearnIf there are several servers
2230c319849SBill Paulavailable (a master and several slaves, for example),
2240c319849SBill Paul.Xr ypbind 8
2254e86fcacSSheldon Hearnwill use the address of the first one to respond.
2264e86fcacSSheldon HearnFrom that point
22700e68c0dSPhilippe Charnieron, the client system will direct all of its
22800e68c0dSPhilippe Charnier.Tn NIS
22900e68c0dSPhilippe Charnierrequests to that server.
2300c319849SBill Paul.Xr Ypbind 8
231e6676766SRuslan Ermilovwill occasionally
232e6676766SRuslan Ermilov.Dq ping
233e6676766SRuslan Ermilovthe server to make sure it is still up
2344e86fcacSSheldon Hearnand running.
2354e86fcacSSheldon HearnIf it fails to receive a reply to one of its pings
2364a8d0283SMike Pritchardwithin a reasonable amount of time,
2370c319849SBill Paul.Xr ypbind 8
2380c319849SBill Paulwill mark the domain as unbound and begin broadcasting again in the
2390c319849SBill Paulhopes of locating another server.
2400c319849SBill Paul.Pp
24100e68c0dSPhilippe Charnier.Tn NIS
24200e68c0dSPhilippe Charniermaster and slave servers handle all
24300e68c0dSPhilippe Charnier.Tn NIS
24400e68c0dSPhilippe Charnierrequests with the
2450c319849SBill Paul.Xr ypserv 8
2460c319849SBill Pauldaemon.
2470c319849SBill Paul.Xr Ypserv 8
24800e68c0dSPhilippe Charnieris responsible for receiving incoming requests from
24900e68c0dSPhilippe Charnier.Tn NIS
25000e68c0dSPhilippe Charnierclients,
2510c319849SBill Paultranslating the requested domain and map name to a path to the
2520c319849SBill Paulcorresponding database file and transmitting data from the database
2534e86fcacSSheldon Hearnback to the client.
2544e86fcacSSheldon HearnThere is a specific set of requests that
2550c319849SBill Paul.Xr ypserv 8
2560c319849SBill Paulis designed to handle, most of which are implemented as functions
2570c319849SBill Paulwithin the standard C library:
258e6676766SRuslan Ermilov.Bl -tag -width ".Fn yp_master"
259e6676766SRuslan Ermilov.It Fn yp_order
260e6676766SRuslan Ermilovcheck the creation date of a particular map
261e6676766SRuslan Ermilov.It Fn yp_master
262e6676766SRuslan Ermilovobtain the name of the
26300e68c0dSPhilippe Charnier.Tn NIS
26400e68c0dSPhilippe Charniermaster server for a given
2650c319849SBill Paulmap/domain
266e6676766SRuslan Ermilov.It Fn yp_match
267e6676766SRuslan Ermilovlookup the data corresponding to a given in key in a particular
2680c319849SBill Paulmap/domain
269e6676766SRuslan Ermilov.It Fn yp_first
270e6676766SRuslan Ermilovobtain the first key/data pair in a particular map/domain
271e6676766SRuslan Ermilov.It Fn yp_next
272e6676766SRuslan Ermilovpass
2730c319849SBill Paul.Xr ypserv 8
2740c319849SBill Paula key in a particular map/domain and have it return the
275edf0e5b3SMike Pritchardkey/data pair immediately following it (the functions
276edf0e5b3SMike Pritchard.Fn yp_first
277edf0e5b3SMike Pritchardand
278edf0e5b3SMike Pritchard.Fn yp_next
27900e68c0dSPhilippe Charniercan be used to do a sequential search of an
28000e68c0dSPhilippe Charnier.Tn NIS
28100e68c0dSPhilippe Charniermap)
282e6676766SRuslan Ermilov.It Fn yp_all
283e6676766SRuslan Ermilovretrieve the entire contents of a map
2840c319849SBill Paul.El
2850c319849SBill Paul.Pp
2860c319849SBill PaulThere are a few other requests which
287edf0e5b3SMike Pritchard.Xr ypserv 8
2880c319849SBill Paulis capable of handling (i.e. acknowledge whether or not you can handle
289e6676766SRuslan Ermilova particular domain
290e6676766SRuslan Ermilov.Pq Dv YPPROC_DOMAIN ,
291e6676766SRuslan Ermilovor acknowledge only if you can handle the domain and be silent otherwise
292e6676766SRuslan Ermilov.Pq Dv YPPROC_DOMAIN_NONACK )
293e6676766SRuslan Ermilovbut
2940c319849SBill Paulthese requests are usually generated only by
295edf0e5b3SMike Pritchard.Xr ypbind 8
2960c319849SBill Pauland are not meant to be used by standard utilities.
2970c319849SBill Paul.Pp
2980c319849SBill PaulOn networks with a large number of hosts, it is often a good idea to
2990c319849SBill Pauluse a master server and several slaves rather than just a single master
3004e86fcacSSheldon Hearnserver.
3014e86fcacSSheldon HearnA slave server provides the exact same information as a master
3020c319849SBill Paulserver: whenever the maps on the master server are updated, the new
3030c319849SBill Pauldata should be propagated to the slave systems using the
3040c319849SBill Paul.Xr yppush 8
3054e86fcacSSheldon Hearncommand.
3064e86fcacSSheldon HearnThe
30700e68c0dSPhilippe Charnier.Tn NIS
308e6676766SRuslan Ermilov.Pa Makefile
309e6676766SRuslan Ermilov.Pq Pa /var/yp/Makefile
3100c319849SBill Paulwill do this automatically if the administrator comments out the
3110c319849SBill Paulline which says
312e6676766SRuslan Ermilov.Dq Li NOPUSH=true
313e6676766SRuslan Ermilov.Va ( NOPUSH
314e6676766SRuslan Ermilovis set to true by default because the default configuration is
31500e68c0dSPhilippe Charnierfor a small network with only one
31600e68c0dSPhilippe Charnier.Tn NIS
317e6676766SRuslan Ermilovserver).
318e6676766SRuslan ErmilovThe
3190c319849SBill Paul.Xr yppush 8
3200c319849SBill Paulcommand will initiate a transaction between the master and slave
3210c319849SBill Paulduring which the slave will transfer the specified maps from the
3220c319849SBill Paulmaster server using
3230c319849SBill Paul.Xr ypxfr 8 .
3240c319849SBill Paul(The slave server calls
3250c319849SBill Paul.Xr ypxfr 8
3260c319849SBill Paulautomatically from within
3270c319849SBill Paul.Xr ypserv 8 ;
3280c319849SBill Paultherefore it is not usually necessary for the administrator
3294e86fcacSSheldon Hearnto use it directly.
3304e86fcacSSheldon HearnIt can be run manually if
3314e86fcacSSheldon Hearndesired, however.)
3324e86fcacSSheldon HearnMaintaining
33300e68c0dSPhilippe Charnierslave servers helps improve
33400e68c0dSPhilippe Charnier.Tn NIS
33500e68c0dSPhilippe Charnierperformance on large
3360c319849SBill Paulnetworks by:
337e6676766SRuslan Ermilov.Bl -bullet
3380c319849SBill Paul.It
33900e68c0dSPhilippe CharnierProviding backup services in the event that the
34000e68c0dSPhilippe Charnier.Tn NIS
34100e68c0dSPhilippe Charniermaster crashes
3424a8d0283SMike Pritchardor becomes unreachable
3430c319849SBill Paul.It
3440c319849SBill PaulSpreading the client load out over several machines instead of
3450c319849SBill Paulcausing the master to become overloaded
3460c319849SBill Paul.It
34700e68c0dSPhilippe CharnierAllowing a single
34800e68c0dSPhilippe Charnier.Tn NIS
34900e68c0dSPhilippe Charnierdomain to extend beyond
3500c319849SBill Paula local network (the
3510c319849SBill Paul.Xr ypbind 8
3520c319849SBill Pauldaemon might not be able to locate a server automatically if it resides on
3534e86fcacSSheldon Hearna network outside the reach of its broadcasts.
3544e86fcacSSheldon HearnIt is possible to force
3550c319849SBill Paul.Xr ypbind 8
3560c319849SBill Paulto bind to a particular server with
3570c319849SBill Paul.Xr ypset 8
3584e86fcacSSheldon Hearnbut this is sometimes inconvenient.
3594e86fcacSSheldon HearnThis problem can be avoided simply by
3600c319849SBill Paulplacing a slave server on the local network.)
3610c319849SBill Paul.El
3620c319849SBill Paul.Pp
363dd5527c6SMike PritchardThe
364b5c508fbSRuslan Ermilov.Fx
3650c319849SBill Paul.Xr ypserv 8
3660c319849SBill Paulis specially designed to provided enhanced security (compared to
36700e68c0dSPhilippe Charnierother
36800e68c0dSPhilippe Charnier.Tn NIS
36900e68c0dSPhilippe Charnierimplementations) when used exclusively with
370b5c508fbSRuslan Ermilov.Fx
371dd5527c6SMike Pritchardclient
3724e86fcacSSheldon Hearnsystems.
3734e86fcacSSheldon HearnThe
374b5c508fbSRuslan Ermilov.Fx
375dd5527c6SMike Pritchardpassword database system (which is derived directly
37621421932SMike Pritchardfrom
37721421932SMike Pritchard.Bx 4.4 )
37821421932SMike Pritchardincludes support for
379edf0e5b3SMike Pritchard.Em "shadow passwords" .
3804a8d0283SMike PritchardThe standard password database does not contain users' encrypted
3810c319849SBill Paulpasswords: these are instead stored (along with other information)
3824a8d0283SMike Pritchardis a separate database which is accessible only by the super-user.
38300e68c0dSPhilippe CharnierIf the encrypted password database were made available as an
38400e68c0dSPhilippe Charnier.Tn NIS
3850c319849SBill Paulmap, this security feature would be totally disabled, since any user
38600e68c0dSPhilippe Charnieris allowed to retrieve
38700e68c0dSPhilippe Charnier.Tn NIS
38800e68c0dSPhilippe Charnierdata.
3890c319849SBill Paul.Pp
390dd5527c6SMike PritchardTo help prevent this,
391b5c508fbSRuslan Ermilov.Fx Ns 's
39200e68c0dSPhilippe Charnier.Tn NIS
39300e68c0dSPhilippe Charnierserver handles the shadow password maps
394e6676766SRuslan Ermilov.Pa ( master.passwd.byname
3950c319849SBill Pauland
3960c319849SBill Paul.Pa master.passwd.byuid )
3970c319849SBill Paulin a special way: the server will only provide access to these
3980c319849SBill Paulmaps in response to requests that originate on privileged ports.
3990c319849SBill PaulSince only the super-user is allowed to bind to a privileged port,
4000c319849SBill Paulthe server assumes that all such requests come from privileged
4014e86fcacSSheldon Hearnusers.
4024e86fcacSSheldon HearnAll other requests are denied: requests from non-privileged
4034e86fcacSSheldon Hearnports will receive only an error code from the server.
4044e86fcacSSheldon HearnAdditionally,
405b5c508fbSRuslan Ermilov.Fx Ns 's
4060c319849SBill Paul.Xr ypserv 8
407e6676766SRuslan Ermilovincludes support for
408e6676766SRuslan Ermilov.An Wietse Venema Ns 's
409e6676766SRuslan Ermilovtcp wrapper package; with tcp
4100c319849SBill Paulwrapper support enabled, the administrator can configure
4110c319849SBill Paul.Xr ypserv 8
4120c319849SBill Paulto respond only to selected client machines.
4130c319849SBill Paul.Pp
41400e68c0dSPhilippe CharnierWhile these enhancements provide better security than stock
41500e68c0dSPhilippe Charnier.Tn NIS Ns ,
4164e86fcacSSheldon Hearnthey are by no means 100% effective.
4174e86fcacSSheldon HearnIt is still possible for
4180c319849SBill Paulsomeone with access to your network to spoof the server into disclosing
4190c319849SBill Paulthe shadow password maps.
4200c319849SBill Paul.Pp
421dd5527c6SMike PritchardOn the client side,
422b5c508fbSRuslan Ermilov.Fx Ns 's
423e6676766SRuslan Ermilov.Xr getpwent 3
4240c319849SBill Paulfunctions will automatically search for the
4250c319849SBill Paul.Pa master.passwd
4264e86fcacSSheldon Hearnmaps and use them if they exist.
4274e86fcacSSheldon HearnIf they do, they will be used, and
4280c319849SBill Paulall fields in these special maps (class, password age and account
4294e86fcacSSheldon Hearnexpiration) will be decoded.
430e6676766SRuslan ErmilovIf they are not found, the standard
4310c319849SBill Paul.Pa passwd
4320c319849SBill Paulmaps will be used instead.
4330c319849SBill Paul.Sh COMPATIBILITY
434b5c508fbSRuslan ErmilovWhen using a
435b5c508fbSRuslan Ermilov.No non- Ns Fx
436e6676766SRuslan Ermilov.Tn NIS
437e6676766SRuslan Ermilovserver for
438d29b3051SBrian Feldman.Xr passwd 5
439b5c508fbSRuslan Ermilovfiles, it is unlikely that the default MD5-based format that
440b5c508fbSRuslan Ermilov.Fx
441d29b3051SBrian Feldmanuses for passwords will be accepted by it.
442e6676766SRuslan ErmilovIf this is the case, the value of the
443e6676766SRuslan Ermilov.Va passwd_format
444e6676766SRuslan Ermilovsetting in
445d29b3051SBrian Feldman.Xr login.conf 5
446e6676766SRuslan Ermilovshould be changed to
447e6676766SRuslan Ermilov.Qq Li des
448e6676766SRuslan Ermilovfor compatibility.
449d29b3051SBrian Feldman.Pp
450e6676766SRuslan ErmilovSome systems, such as
451e6676766SRuslan Ermilov.Tn SunOS
452e6676766SRuslan Ermilov4.x, need
45300e68c0dSPhilippe Charnier.Tn NIS
45400e68c0dSPhilippe Charnierto be running in order
4556f238937SDima Dorfmanfor their hostname resolution functions
4563dcd2b7eSRuslan Ermilov.Fn ( gethostbyname ,
4573dcd2b7eSRuslan Ermilov.Fn gethostbyaddr ,
4583dcd2b7eSRuslan Ermilovetc.) to work properly.
4594e86fcacSSheldon HearnOn these systems,
4600c319849SBill Paul.Xr ypserv 8
46100e68c0dSPhilippe Charnierperforms
46200e68c0dSPhilippe Charnier.Tn DNS
46300e68c0dSPhilippe Charnierlookups when asked to return information about
464e6676766SRuslan Ermilova host that does not exist in its
4650c319849SBill Paul.Pa hosts.byname
4660c319849SBill Paulor
4670c319849SBill Paul.Pa hosts.byaddr
468dd5527c6SMike Pritchardmaps.
469b5c508fbSRuslan Ermilov.Fx Ns 's
47000e68c0dSPhilippe Charnierresolver uses
47100e68c0dSPhilippe Charnier.Tn DNS
47200e68c0dSPhilippe Charnierby default (it can be made to use
473e6676766SRuslan Ermilov.Tn NIS ,
47400e68c0dSPhilippe Charnierif desired), therefore its
47500e68c0dSPhilippe Charnier.Tn NIS
476e6676766SRuslan Ermilovserver does not do
47710edb738SNik Clayton.Tn DNS
47800e68c0dSPhilippe Charnierlookups
4794e86fcacSSheldon Hearnby default.
4804e86fcacSSheldon HearnHowever,
4810c319849SBill Paul.Xr ypserv 8
48200e68c0dSPhilippe Charniercan be made to perform
48300e68c0dSPhilippe Charnier.Tn DNS
48400e68c0dSPhilippe Charnierlookups if it is started with a special
4854e86fcacSSheldon Hearnflag.
4864e86fcacSSheldon HearnIt can also be made to register itself as an
48700e68c0dSPhilippe Charnier.Tn NIS
48800e68c0dSPhilippe Charnierv1 server
4890c319849SBill Paulin order to placate certain systems that insist on the presence of
490dd5527c6SMike Pritcharda v1 server
491b5c508fbSRuslan Ermilov.No ( Fx
49200e68c0dSPhilippe Charnieruses only
49300e68c0dSPhilippe Charnier.Tn NIS
49400e68c0dSPhilippe Charnierv2, but many other systems,
495dd5527c6SMike Pritchardincluding
496dd5527c6SMike Pritchard.Tn SunOS
497dd5527c6SMike Pritchard4.x, search for both a v1 and v2 server when binding).
498b5c508fbSRuslan Ermilov.Fx Ns 's
4990c319849SBill Paul.Xr ypserv 8
50000e68c0dSPhilippe Charnierdoes not actually handle
50100e68c0dSPhilippe Charnier.Tn NIS
502e6676766SRuslan Ermilovv1 requests, but this
503e6676766SRuslan Ermilov.Dq "kludge mode"
5040c319849SBill Paulis useful for silencing stubborn systems that search for both
5050c319849SBill Paula v1 and v2 server.
5060c319849SBill Paul.Pp
5070c319849SBill Paul(Please see the
5080c319849SBill Paul.Xr ypserv 8
5090c319849SBill Paulmanual page for a detailed description of these special features
5100c319849SBill Pauland flags.)
5110c319849SBill Paul.Sh BUGS
512dd5527c6SMike PritchardWhile
513b5c508fbSRuslan Ermilov.Fx
51400e68c0dSPhilippe Charniernow has both
51500e68c0dSPhilippe Charnier.Tn NIS
51600e68c0dSPhilippe Charnierclient and server capabilities, it does not yet have support for
5176a6c4c22SMike Pritchard.Xr ypupdated 8
5180c319849SBill Paulor the
5190c319849SBill Paul.Fn yp_update
5204e86fcacSSheldon Hearnfunction.
5214e86fcacSSheldon HearnBoth of these require secure
522e6676766SRuslan Ermilov.Tn RPC ,
52300e68c0dSPhilippe Charnierwhich
524b5c508fbSRuslan Ermilov.Fx
525e6676766SRuslan Ermilovdoes not
5260c319849SBill Paulsupport yet either.
5270c319849SBill Paul.Pp
5280c319849SBill PaulThe
5290c319849SBill Paul.Xr getservent 3
5300c319849SBill Pauland
5310c319849SBill Paul.Xr getprotoent 3
53200e68c0dSPhilippe Charnierfunctions do not yet have
53300e68c0dSPhilippe Charnier.Tn NIS
5344e86fcacSSheldon Hearnsupport.
5354e86fcacSSheldon HearnFortunately, these files
536e6676766SRuslan Ermilovdo not need to be updated that often.
5370c319849SBill Paul.Pp
538edf0e5b3SMike PritchardMany more manual pages should be written, especially
539edf0e5b3SMike Pritchard.Xr ypclnt 3 .
540c1d06ca1SGarrett WollmanFor the time being, seek out a local Sun machine and read the
541c1d06ca1SGarrett Wollmanmanuals for there.
5420c319849SBill Paul.Pp
543c1d06ca1SGarrett WollmanNeither Sun nor this author have found a clean way to handle
544c1d06ca1SGarrett Wollmanthe problems that occur when ypbind cannot find its server
545c1d06ca1SGarrett Wollmanupon bootup.
546c1d06ca1SGarrett Wollman.Sh HISTORY
547c1d06ca1SGarrett WollmanThe
548c1d06ca1SGarrett Wollman.Nm YP
54900e68c0dSPhilippe Charniersubsystem was written from the ground up by
55000e68c0dSPhilippe Charnier.An Theo de Raadt
5514e86fcacSSheldon Hearnto be compatible to Sun's implementation.
5524e86fcacSSheldon HearnBug fixes, improvements
55300e68c0dSPhilippe Charnierand
55400e68c0dSPhilippe Charnier.Tn NIS
55500e68c0dSPhilippe Charnierserver support were later added by
556e6676766SRuslan Ermilov.An Bill Paul .
55700e68c0dSPhilippe CharnierThe server-side code was originally written by
55800e68c0dSPhilippe Charnier.An Peter Eriksson
55900e68c0dSPhilippe Charnierand
56000e68c0dSPhilippe Charnier.An Tobias Reber
5614e86fcacSSheldon Hearnand is subject to the GNU Public License.
5624e86fcacSSheldon HearnNo Sun code was
563c1d06ca1SGarrett Wollmanreferenced.
564