xref: /freebsd/share/man/man8/yp.8 (revision 5203edcdc553fda6caa1da8826a89b1a02dad1bf)
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.
208c42ce50dSPhilippe CharnierThe
209c42ce50dSPhilippe Charnier.Xr ypbind 8
210c42ce50dSPhilippe Charnierutility checks the system's default domain (as set by the
2110c319849SBill Paul.Xr domainname 1
21200e68c0dSPhilippe Charniercommand) and begins broadcasting
21300e68c0dSPhilippe Charnier.Tn RPC
21400e68c0dSPhilippe Charnierrequests on the local network.
2150c319849SBill PaulThese requests specify the name of the domain for which
2160c319849SBill Paul.Xr ypbind 8
2174e86fcacSSheldon Hearnis attempting to establish a binding.
2184e86fcacSSheldon HearnIf a server that has been
2190c319849SBill Paulconfigured to serve the requested domain receives one of the broadcasts,
2200c319849SBill Paulit will respond to
2210c319849SBill Paul.Xr ypbind 8 ,
2224e86fcacSSheldon Hearnwhich will record the server's address.
2234e86fcacSSheldon HearnIf there are several servers
2240c319849SBill Paulavailable (a master and several slaves, for example),
2250c319849SBill Paul.Xr ypbind 8
2264e86fcacSSheldon Hearnwill use the address of the first one to respond.
2274e86fcacSSheldon HearnFrom that point
22800e68c0dSPhilippe Charnieron, the client system will direct all of its
22900e68c0dSPhilippe Charnier.Tn NIS
23000e68c0dSPhilippe Charnierrequests to that server.
231c42ce50dSPhilippe CharnierThe
232c42ce50dSPhilippe Charnier.Xr ypbind 8
233c42ce50dSPhilippe Charnierutility will occasionally
234e6676766SRuslan Ermilov.Dq ping
235e6676766SRuslan Ermilovthe server to make sure it is still up
2364e86fcacSSheldon Hearnand running.
2374e86fcacSSheldon HearnIf it fails to receive a reply to one of its pings
2384a8d0283SMike Pritchardwithin a reasonable amount of time,
2390c319849SBill Paul.Xr ypbind 8
2400c319849SBill Paulwill mark the domain as unbound and begin broadcasting again in the
2410c319849SBill Paulhopes of locating another server.
2420c319849SBill Paul.Pp
24300e68c0dSPhilippe Charnier.Tn NIS
24400e68c0dSPhilippe Charniermaster and slave servers handle all
24500e68c0dSPhilippe Charnier.Tn NIS
24600e68c0dSPhilippe Charnierrequests with the
2470c319849SBill Paul.Xr ypserv 8
2480c319849SBill Pauldaemon.
249c42ce50dSPhilippe CharnierThe
250c42ce50dSPhilippe Charnier.Xr ypserv 8
251c42ce50dSPhilippe Charnierutility is responsible for receiving incoming requests from
25200e68c0dSPhilippe Charnier.Tn NIS
25300e68c0dSPhilippe Charnierclients,
2540c319849SBill Paultranslating the requested domain and map name to a path to the
2550c319849SBill Paulcorresponding database file and transmitting data from the database
2564e86fcacSSheldon Hearnback to the client.
2574e86fcacSSheldon HearnThere is a specific set of requests that
2580c319849SBill Paul.Xr ypserv 8
2590c319849SBill Paulis designed to handle, most of which are implemented as functions
2600c319849SBill Paulwithin the standard C library:
261e6676766SRuslan Ermilov.Bl -tag -width ".Fn yp_master"
262e6676766SRuslan Ermilov.It Fn yp_order
263e6676766SRuslan Ermilovcheck the creation date of a particular map
264e6676766SRuslan Ermilov.It Fn yp_master
265e6676766SRuslan Ermilovobtain the name of the
26600e68c0dSPhilippe Charnier.Tn NIS
26700e68c0dSPhilippe Charniermaster server for a given
2680c319849SBill Paulmap/domain
269e6676766SRuslan Ermilov.It Fn yp_match
270e6676766SRuslan Ermilovlookup the data corresponding to a given in key in a particular
2710c319849SBill Paulmap/domain
272e6676766SRuslan Ermilov.It Fn yp_first
273e6676766SRuslan Ermilovobtain the first key/data pair in a particular map/domain
274e6676766SRuslan Ermilov.It Fn yp_next
275e6676766SRuslan Ermilovpass
2760c319849SBill Paul.Xr ypserv 8
2770c319849SBill Paula key in a particular map/domain and have it return the
278edf0e5b3SMike Pritchardkey/data pair immediately following it (the functions
279edf0e5b3SMike Pritchard.Fn yp_first
280edf0e5b3SMike Pritchardand
281edf0e5b3SMike Pritchard.Fn yp_next
28200e68c0dSPhilippe Charniercan be used to do a sequential search of an
28300e68c0dSPhilippe Charnier.Tn NIS
28400e68c0dSPhilippe Charniermap)
285e6676766SRuslan Ermilov.It Fn yp_all
286e6676766SRuslan Ermilovretrieve the entire contents of a map
2870c319849SBill Paul.El
2880c319849SBill Paul.Pp
2890c319849SBill PaulThere are a few other requests which
290edf0e5b3SMike Pritchard.Xr ypserv 8
2915203edcdSRuslan Ermilovis capable of handling (i.e., acknowledge whether or not you can handle
292e6676766SRuslan Ermilova particular domain
293e6676766SRuslan Ermilov.Pq Dv YPPROC_DOMAIN ,
294e6676766SRuslan Ermilovor acknowledge only if you can handle the domain and be silent otherwise
295e6676766SRuslan Ermilov.Pq Dv YPPROC_DOMAIN_NONACK )
296e6676766SRuslan Ermilovbut
2970c319849SBill Paulthese requests are usually generated only by
298edf0e5b3SMike Pritchard.Xr ypbind 8
2990c319849SBill Pauland are not meant to be used by standard utilities.
3000c319849SBill Paul.Pp
3010c319849SBill PaulOn networks with a large number of hosts, it is often a good idea to
3020c319849SBill Pauluse a master server and several slaves rather than just a single master
3034e86fcacSSheldon Hearnserver.
3044e86fcacSSheldon HearnA slave server provides the exact same information as a master
3050c319849SBill Paulserver: whenever the maps on the master server are updated, the new
3060c319849SBill Pauldata should be propagated to the slave systems using the
3070c319849SBill Paul.Xr yppush 8
3084e86fcacSSheldon Hearncommand.
3094e86fcacSSheldon HearnThe
31000e68c0dSPhilippe Charnier.Tn NIS
311e6676766SRuslan Ermilov.Pa Makefile
312e6676766SRuslan Ermilov.Pq Pa /var/yp/Makefile
3130c319849SBill Paulwill do this automatically if the administrator comments out the
3140c319849SBill Paulline which says
315e6676766SRuslan Ermilov.Dq Li NOPUSH=true
316e6676766SRuslan Ermilov.Va ( NOPUSH
317e6676766SRuslan Ermilovis set to true by default because the default configuration is
31800e68c0dSPhilippe Charnierfor a small network with only one
31900e68c0dSPhilippe Charnier.Tn NIS
320e6676766SRuslan Ermilovserver).
321e6676766SRuslan ErmilovThe
3220c319849SBill Paul.Xr yppush 8
3230c319849SBill Paulcommand will initiate a transaction between the master and slave
3240c319849SBill Paulduring which the slave will transfer the specified maps from the
3250c319849SBill Paulmaster server using
3260c319849SBill Paul.Xr ypxfr 8 .
3270c319849SBill Paul(The slave server calls
3280c319849SBill Paul.Xr ypxfr 8
3290c319849SBill Paulautomatically from within
3300c319849SBill Paul.Xr ypserv 8 ;
3310c319849SBill Paultherefore it is not usually necessary for the administrator
3324e86fcacSSheldon Hearnto use it directly.
3334e86fcacSSheldon HearnIt can be run manually if
3344e86fcacSSheldon Hearndesired, however.)
3354e86fcacSSheldon HearnMaintaining
33600e68c0dSPhilippe Charnierslave servers helps improve
33700e68c0dSPhilippe Charnier.Tn NIS
33800e68c0dSPhilippe Charnierperformance on large
3390c319849SBill Paulnetworks by:
340e6676766SRuslan Ermilov.Bl -bullet
3410c319849SBill Paul.It
34200e68c0dSPhilippe CharnierProviding backup services in the event that the
34300e68c0dSPhilippe Charnier.Tn NIS
34400e68c0dSPhilippe Charniermaster crashes
3454a8d0283SMike Pritchardor becomes unreachable
3460c319849SBill Paul.It
3470c319849SBill PaulSpreading the client load out over several machines instead of
3480c319849SBill Paulcausing the master to become overloaded
3490c319849SBill Paul.It
35000e68c0dSPhilippe CharnierAllowing a single
35100e68c0dSPhilippe Charnier.Tn NIS
35200e68c0dSPhilippe Charnierdomain to extend beyond
3530c319849SBill Paula local network (the
3540c319849SBill Paul.Xr ypbind 8
3550c319849SBill Pauldaemon might not be able to locate a server automatically if it resides on
3564e86fcacSSheldon Hearna network outside the reach of its broadcasts.
3574e86fcacSSheldon HearnIt is possible to force
3580c319849SBill Paul.Xr ypbind 8
3590c319849SBill Paulto bind to a particular server with
3600c319849SBill Paul.Xr ypset 8
3614e86fcacSSheldon Hearnbut this is sometimes inconvenient.
3624e86fcacSSheldon HearnThis problem can be avoided simply by
3630c319849SBill Paulplacing a slave server on the local network.)
3640c319849SBill Paul.El
3650c319849SBill Paul.Pp
366dd5527c6SMike PritchardThe
367b5c508fbSRuslan Ermilov.Fx
3680c319849SBill Paul.Xr ypserv 8
369568fb879SRuslan Ermilovis specially designed to provide enhanced security (compared to
37000e68c0dSPhilippe Charnierother
37100e68c0dSPhilippe Charnier.Tn NIS
37200e68c0dSPhilippe Charnierimplementations) when used exclusively with
373b5c508fbSRuslan Ermilov.Fx
374dd5527c6SMike Pritchardclient
3754e86fcacSSheldon Hearnsystems.
3764e86fcacSSheldon HearnThe
377b5c508fbSRuslan Ermilov.Fx
378dd5527c6SMike Pritchardpassword database system (which is derived directly
37921421932SMike Pritchardfrom
38021421932SMike Pritchard.Bx 4.4 )
38121421932SMike Pritchardincludes support for
382edf0e5b3SMike Pritchard.Em "shadow passwords" .
3834a8d0283SMike PritchardThe standard password database does not contain users' encrypted
3840c319849SBill Paulpasswords: these are instead stored (along with other information)
38592585090SMasafumi Max NAKANEin a separate database which is accessible only by the super-user.
38600e68c0dSPhilippe CharnierIf the encrypted password database were made available as an
38700e68c0dSPhilippe Charnier.Tn NIS
3880c319849SBill Paulmap, this security feature would be totally disabled, since any user
38900e68c0dSPhilippe Charnieris allowed to retrieve
39000e68c0dSPhilippe Charnier.Tn NIS
39100e68c0dSPhilippe Charnierdata.
3920c319849SBill Paul.Pp
393dd5527c6SMike PritchardTo help prevent this,
394b5c508fbSRuslan Ermilov.Fx Ns 's
39500e68c0dSPhilippe Charnier.Tn NIS
39600e68c0dSPhilippe Charnierserver handles the shadow password maps
397e6676766SRuslan Ermilov.Pa ( master.passwd.byname
3980c319849SBill Pauland
3990c319849SBill Paul.Pa master.passwd.byuid )
4000c319849SBill Paulin a special way: the server will only provide access to these
4010c319849SBill Paulmaps in response to requests that originate on privileged ports.
4020c319849SBill PaulSince only the super-user is allowed to bind to a privileged port,
4030c319849SBill Paulthe server assumes that all such requests come from privileged
4044e86fcacSSheldon Hearnusers.
4054e86fcacSSheldon HearnAll other requests are denied: requests from non-privileged
4064e86fcacSSheldon Hearnports will receive only an error code from the server.
4074e86fcacSSheldon HearnAdditionally,
408b5c508fbSRuslan Ermilov.Fx Ns 's
4090c319849SBill Paul.Xr ypserv 8
410e6676766SRuslan Ermilovincludes support for
411e6676766SRuslan Ermilov.An Wietse Venema Ns 's
412e6676766SRuslan Ermilovtcp wrapper package; with tcp
4130c319849SBill Paulwrapper support enabled, the administrator can configure
4140c319849SBill Paul.Xr ypserv 8
4150c319849SBill Paulto respond only to selected client machines.
4160c319849SBill Paul.Pp
41700e68c0dSPhilippe CharnierWhile these enhancements provide better security than stock
418a654c53eSRuslan Ermilov.Tn NIS ,
4194e86fcacSSheldon Hearnthey are by no means 100% effective.
4204e86fcacSSheldon HearnIt is still possible for
4210c319849SBill Paulsomeone with access to your network to spoof the server into disclosing
4220c319849SBill Paulthe shadow password maps.
4230c319849SBill Paul.Pp
424dd5527c6SMike PritchardOn the client side,
425b5c508fbSRuslan Ermilov.Fx Ns 's
426e6676766SRuslan Ermilov.Xr getpwent 3
4270c319849SBill Paulfunctions will automatically search for the
4280c319849SBill Paul.Pa master.passwd
4294e86fcacSSheldon Hearnmaps and use them if they exist.
4304e86fcacSSheldon HearnIf they do, they will be used, and
4310c319849SBill Paulall fields in these special maps (class, password age and account
4324e86fcacSSheldon Hearnexpiration) will be decoded.
433e6676766SRuslan ErmilovIf they are not found, the standard
4340c319849SBill Paul.Pa passwd
4350c319849SBill Paulmaps will be used instead.
4360c319849SBill Paul.Sh COMPATIBILITY
437b5c508fbSRuslan ErmilovWhen using a
438b5c508fbSRuslan Ermilov.No non- Ns Fx
439e6676766SRuslan Ermilov.Tn NIS
440e6676766SRuslan Ermilovserver for
441d29b3051SBrian Feldman.Xr passwd 5
442b5c508fbSRuslan Ermilovfiles, it is unlikely that the default MD5-based format that
443b5c508fbSRuslan Ermilov.Fx
444d29b3051SBrian Feldmanuses for passwords will be accepted by it.
445e6676766SRuslan ErmilovIf this is the case, the value of the
446e6676766SRuslan Ermilov.Va passwd_format
447e6676766SRuslan Ermilovsetting in
448d29b3051SBrian Feldman.Xr login.conf 5
449e6676766SRuslan Ermilovshould be changed to
450e6676766SRuslan Ermilov.Qq Li des
451e6676766SRuslan Ermilovfor compatibility.
452d29b3051SBrian Feldman.Pp
453e6676766SRuslan ErmilovSome systems, such as
454e6676766SRuslan Ermilov.Tn SunOS
455e6676766SRuslan Ermilov4.x, need
45600e68c0dSPhilippe Charnier.Tn NIS
45700e68c0dSPhilippe Charnierto be running in order
4586f238937SDima Dorfmanfor their hostname resolution functions
4593dcd2b7eSRuslan Ermilov.Fn ( gethostbyname ,
4603dcd2b7eSRuslan Ermilov.Fn gethostbyaddr ,
4613dcd2b7eSRuslan Ermilovetc.) to work properly.
4624e86fcacSSheldon HearnOn these systems,
4630c319849SBill Paul.Xr ypserv 8
46400e68c0dSPhilippe Charnierperforms
46500e68c0dSPhilippe Charnier.Tn DNS
46600e68c0dSPhilippe Charnierlookups when asked to return information about
467e6676766SRuslan Ermilova host that does not exist in its
4680c319849SBill Paul.Pa hosts.byname
4690c319849SBill Paulor
4700c319849SBill Paul.Pa hosts.byaddr
471dd5527c6SMike Pritchardmaps.
472b5c508fbSRuslan Ermilov.Fx Ns 's
47300e68c0dSPhilippe Charnierresolver uses
47400e68c0dSPhilippe Charnier.Tn DNS
47500e68c0dSPhilippe Charnierby default (it can be made to use
476e6676766SRuslan Ermilov.Tn NIS ,
47700e68c0dSPhilippe Charnierif desired), therefore its
47800e68c0dSPhilippe Charnier.Tn NIS
479e6676766SRuslan Ermilovserver does not do
48010edb738SNik Clayton.Tn DNS
48100e68c0dSPhilippe Charnierlookups
4824e86fcacSSheldon Hearnby default.
4834e86fcacSSheldon HearnHowever,
4840c319849SBill Paul.Xr ypserv 8
48500e68c0dSPhilippe Charniercan be made to perform
48600e68c0dSPhilippe Charnier.Tn DNS
48700e68c0dSPhilippe Charnierlookups if it is started with a special
4884e86fcacSSheldon Hearnflag.
4894e86fcacSSheldon HearnIt can also be made to register itself as an
49000e68c0dSPhilippe Charnier.Tn NIS
49100e68c0dSPhilippe Charnierv1 server
4920c319849SBill Paulin order to placate certain systems that insist on the presence of
493dd5527c6SMike Pritcharda v1 server
494b5c508fbSRuslan Ermilov.No ( Fx
49500e68c0dSPhilippe Charnieruses only
49600e68c0dSPhilippe Charnier.Tn NIS
49700e68c0dSPhilippe Charnierv2, but many other systems,
498dd5527c6SMike Pritchardincluding
499dd5527c6SMike Pritchard.Tn SunOS
500dd5527c6SMike Pritchard4.x, search for both a v1 and v2 server when binding).
501b5c508fbSRuslan Ermilov.Fx Ns 's
5020c319849SBill Paul.Xr ypserv 8
50300e68c0dSPhilippe Charnierdoes not actually handle
50400e68c0dSPhilippe Charnier.Tn NIS
505e6676766SRuslan Ermilovv1 requests, but this
506e6676766SRuslan Ermilov.Dq "kludge mode"
5070c319849SBill Paulis useful for silencing stubborn systems that search for both
5080c319849SBill Paula v1 and v2 server.
5090c319849SBill Paul.Pp
5100c319849SBill Paul(Please see the
5110c319849SBill Paul.Xr ypserv 8
5120c319849SBill Paulmanual page for a detailed description of these special features
5130c319849SBill Pauland flags.)
5140c319849SBill Paul.Sh BUGS
515dd5527c6SMike PritchardWhile
516b5c508fbSRuslan Ermilov.Fx
51700e68c0dSPhilippe Charniernow has both
51800e68c0dSPhilippe Charnier.Tn NIS
51900e68c0dSPhilippe Charnierclient and server capabilities, it does not yet have support for
5206a6c4c22SMike Pritchard.Xr ypupdated 8
5210c319849SBill Paulor the
5220c319849SBill Paul.Fn yp_update
5234e86fcacSSheldon Hearnfunction.
5244e86fcacSSheldon HearnBoth of these require secure
525e6676766SRuslan Ermilov.Tn RPC ,
52600e68c0dSPhilippe Charnierwhich
527b5c508fbSRuslan Ermilov.Fx
528e6676766SRuslan Ermilovdoes not
5290c319849SBill Paulsupport yet either.
5300c319849SBill Paul.Pp
5310c319849SBill PaulThe
5320c319849SBill Paul.Xr getservent 3
5330c319849SBill Pauland
5340c319849SBill Paul.Xr getprotoent 3
53500e68c0dSPhilippe Charnierfunctions do not yet have
53600e68c0dSPhilippe Charnier.Tn NIS
5374e86fcacSSheldon Hearnsupport.
5384e86fcacSSheldon HearnFortunately, these files
539e6676766SRuslan Ermilovdo not need to be updated that often.
5400c319849SBill Paul.Pp
541edf0e5b3SMike PritchardMany more manual pages should be written, especially
542edf0e5b3SMike Pritchard.Xr ypclnt 3 .
543c1d06ca1SGarrett WollmanFor the time being, seek out a local Sun machine and read the
544c1d06ca1SGarrett Wollmanmanuals for there.
5450c319849SBill Paul.Pp
546c1d06ca1SGarrett WollmanNeither Sun nor this author have found a clean way to handle
547c1d06ca1SGarrett Wollmanthe problems that occur when ypbind cannot find its server
548c1d06ca1SGarrett Wollmanupon bootup.
549c1d06ca1SGarrett Wollman.Sh HISTORY
550c1d06ca1SGarrett WollmanThe
551c1d06ca1SGarrett Wollman.Nm YP
55200e68c0dSPhilippe Charniersubsystem was written from the ground up by
55300e68c0dSPhilippe Charnier.An Theo de Raadt
5544e86fcacSSheldon Hearnto be compatible to Sun's implementation.
5554e86fcacSSheldon HearnBug fixes, improvements
55600e68c0dSPhilippe Charnierand
55700e68c0dSPhilippe Charnier.Tn NIS
55800e68c0dSPhilippe Charnierserver support were later added by
559e6676766SRuslan Ermilov.An Bill Paul .
56000e68c0dSPhilippe CharnierThe server-side code was originally written by
56100e68c0dSPhilippe Charnier.An Peter Eriksson
56200e68c0dSPhilippe Charnierand
56300e68c0dSPhilippe Charnier.An Tobias Reber
5644e86fcacSSheldon Hearnand is subject to the GNU Public License.
5654e86fcacSSheldon HearnNo Sun code was
566c1d06ca1SGarrett Wollmanreferenced.
567