xref: /freebsd/share/man/man8/yp.8 (revision 00e68c0d734aa61fac733a501de9226726dec4bf)
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
2900e68c0dSPhilippe Charnier.\"	$Id: yp.4,v 1.13 1997/10/31 12:30:49 charnier Exp $
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
38c1d06ca1SGarrett Wollman.Nm yp
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
600c319849SBill Paulsupport for the hosts, services and rpc databases is enabled by
610c319849SBill Pauluncommenting the
6200e68c0dSPhilippe Charnier.Em nis
630c319849SBill Paulline in
640c319849SBill Paul.Pa /etc/host.conf .
6500e68c0dSPhilippe Charnier.Tn NIS
6600e68c0dSPhilippe Charniersupport for the remaining services is
670c319849SBill Paulactivated by adding a special '+' entry to the appropriate file.
680c319849SBill Paul.Pp
69c1d06ca1SGarrett WollmanThe
70c1d06ca1SGarrett Wollman.Nm YP
71c1d06ca1SGarrett Wollmansubsystem is started automatically in
720c319849SBill Paul.Pa /etc/rc
730c319849SBill Paulif it has been initialized in
7430d8a82fSPhilippe Charnier.Pa /etc/rc.conf
750c319849SBill Pauland if the directory
76edf0e5b3SMike Pritchard.Pa /var/yp
770c319849SBill Paulexists (which it does in the default distribution). The default
7800e68c0dSPhilippe Charnier.Tn NIS
7900e68c0dSPhilippe Charnierdomain must also be set with the
800c319849SBill Paul.Xr domainname 1
810c319849SBill Paulcommand, which will happen automatically at system startup if it is
820c319849SBill Paulspecified in
8330d8a82fSPhilippe Charnier.Pa /etc/rc.conf .
840c319849SBill Paul.Pp
8500e68c0dSPhilippe Charnier.Tn NIS
8600e68c0dSPhilippe Charnieris an
8700e68c0dSPhilippe Charnier.Tn RPC Ns -based
8800e68c0dSPhilippe Charnierclient/server system that allows a group of
8900e68c0dSPhilippe Charniermachines within an
9000e68c0dSPhilippe Charnier.Tn NIS
9100e68c0dSPhilippe Charnierdomain to share a common set of configuration files. This permits a system
9200e68c0dSPhilippe Charnieradministrator to set up
9300e68c0dSPhilippe Charnier.Tn NIS
9400e68c0dSPhilippe Charnierclient systems with only minimal configuration
950c319849SBill Pauldata and add, remove or modify configuration data from a single location.
960c319849SBill Paul.Pp
9700e68c0dSPhilippe CharnierThe canonical copies of all
9800e68c0dSPhilippe Charnier.Tn NIS
9900e68c0dSPhilippe Charnierinformation are stored on a single machine
1000c319849SBill Paulcalled the
10100e68c0dSPhilippe Charnier.Em Tn NIS master server .
1020c319849SBill PaulThe databases used to store the information are called
10300e68c0dSPhilippe Charnier.Em Tn NIS maps .
104dd5527c6SMike PritchardIn
10500e68c0dSPhilippe Charnier.Bx Free ,
106dd5527c6SMike Pritchardthese maps are stored in
1070c319849SBill Paul.Pa /var/yp/[domainname]
1080c319849SBill Paulwhere
1090c319849SBill Paul.Pa [domainname]
11000e68c0dSPhilippe Charnieris the name of the
11100e68c0dSPhilippe Charnier.Tn NIS
11200e68c0dSPhilippe Charnierdomain being served. A single
11300e68c0dSPhilippe Charnier.Tn NIS
11400e68c0dSPhilippe Charnierserver can
1150c319849SBill Paulsupport several domains at once, therefore it is possible to have several
1160c319849SBill Paulsuch directories, one for each supported domain. Each domain will have
1170c319849SBill Paulits own independent set of maps.
1180c319849SBill Paul.Pp
119dd5527c6SMike PritchardIn
12000e68c0dSPhilippe Charnier.Bx Free ,
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
12600e68c0dSPhilippe Charnierdatabase files). Other operating systems that support
12700e68c0dSPhilippe Charnier.Tn NIS
12800e68c0dSPhilippe Charnieruse old-style
1290c319849SBill Paulndbm databases instead (largely because Sun Microsystems originally based
13000e68c0dSPhilippe Charniertheir
13100e68c0dSPhilippe Charnier.Tn NIS
13200e68c0dSPhilippe Charnierimplementation on ndbm, and other vendors have simply licensed
1330c319849SBill PaulSun's code rather than design their own implementation with a different
1340c319849SBill Pauldatabase format). On these systems, the databases are generally split
1350c319849SBill Paulinto
1366a6c4c22SMike Pritchard.Em .dir
137c1d06ca1SGarrett Wollmanand
1386a6c4c22SMike Pritchard.Em .pag
1394a8d0283SMike Pritchardfiles which the ndbm code uses to hold separate parts of the hash
1400c319849SBill Pauldatabase. The Berkeley DB hash method instead uses a single file for
1410c319849SBill Paulboth pieces of information. This means that while you may have
1420c319849SBill Paul.Pa passwd.byname.dir
1430c319849SBill Pauland
1440c319849SBill Paul.Pa passwd.byname.pag
1450c319849SBill Paulfiles on other operating systems (both of which are really parts of the
146dd5527c6SMike Pritchardsame map),
14700e68c0dSPhilippe Charnier.Bx Free
148dd5527c6SMike Pritchardwill have only one file called
1490c319849SBill Paul.Pa passwd.byname .
1500c319849SBill PaulThe difference in format is not significant: only the
15100e68c0dSPhilippe Charnier.Tn NIS
15200e68c0dSPhilippe Charnierserver,
1530c319849SBill Paul.Xr ypserv 8 ,
15400e68c0dSPhilippe Charnierand related tools need to know the database format of the
15500e68c0dSPhilippe Charnier.Tn NIS
15600e68c0dSPhilippe Charniermaps. Client
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
16900e68c0dSPhilippe Charnier.Pa Tn NIS clients ,
17000e68c0dSPhilippe Charnierwhich query
17100e68c0dSPhilippe Charnier.Tn NIS
17200e68c0dSPhilippe Charnierservers for information.
1730c319849SBill Paul.It
17400e68c0dSPhilippe Charnier.Pa Tn NIS master servers ,
17500e68c0dSPhilippe Charnierwhich maintain the canonical copies of all
17600e68c0dSPhilippe Charnier.Tn NIS
17700e68c0dSPhilippe Charniermaps.
1780c319849SBill Paul.It
17900e68c0dSPhilippe Charnier.Pa Tn NIS slave servers ,
18000e68c0dSPhilippe Charnierwhich maintain backup copies of
18100e68c0dSPhilippe Charnier.Tn NIS
18200e68c0dSPhilippe Charniermaps that are periodically
1830c319849SBill Paulupdated by the master.
1840c319849SBill Paul.El
1850c319849SBill Paul.Pp
18600e68c0dSPhilippe CharnierAn
18700e68c0dSPhilippe Charnier.Tn NIS
18800e68c0dSPhilippe Charnierclient establishes what is called a
189edf0e5b3SMike Pritchard.Em binding
19000e68c0dSPhilippe Charnierto a particular
19100e68c0dSPhilippe Charnier.Tn NIS
19200e68c0dSPhilippe Charnierserver using the
1930c319849SBill Paul.Xr ypbind 8
1940c319849SBill Pauldaemon.
1950c319849SBill Paul.Xr Ypbind 8
1960c319849SBill Paulchecks the system's default domain (as set by the
1970c319849SBill Paul.Xr domainname 1
19800e68c0dSPhilippe Charniercommand) and begins broadcasting
19900e68c0dSPhilippe Charnier.Tn RPC
20000e68c0dSPhilippe Charnierrequests on the local network.
2010c319849SBill PaulThese requests specify the name of the domain for which
2020c319849SBill Paul.Xr ypbind 8
2030c319849SBill Paulis attempting to establish a binding. If a server that has been
2040c319849SBill Paulconfigured to serve the requested domain receives one of the broadcasts,
2050c319849SBill Paulit will respond to
2060c319849SBill Paul.Xr ypbind 8 ,
2070c319849SBill Paulwhich will record the server's address. If there are several servers
2080c319849SBill Paulavailable (a master and several slaves, for example),
2090c319849SBill Paul.Xr ypbind 8
2100c319849SBill Paulwill use the address of the first one to respond. From that point
21100e68c0dSPhilippe Charnieron, the client system will direct all of its
21200e68c0dSPhilippe Charnier.Tn NIS
21300e68c0dSPhilippe Charnierrequests to that server.
2140c319849SBill Paul.Xr Ypbind 8
2150c319849SBill Paulwill occasionally ``ping'' the server to make sure it's still up
2160c319849SBill Pauland running. If it fails to receive a reply to one of its pings
2174a8d0283SMike Pritchardwithin a reasonable amount of time,
2180c319849SBill Paul.Xr ypbind 8
2190c319849SBill Paulwill mark the domain as unbound and begin broadcasting again in the
2200c319849SBill Paulhopes of locating another server.
2210c319849SBill Paul.Pp
22200e68c0dSPhilippe Charnier.Tn NIS
22300e68c0dSPhilippe Charniermaster and slave servers handle all
22400e68c0dSPhilippe Charnier.Tn NIS
22500e68c0dSPhilippe Charnierrequests with the
2260c319849SBill Paul.Xr ypserv 8
2270c319849SBill Pauldaemon.
2280c319849SBill Paul.Xr Ypserv 8
22900e68c0dSPhilippe Charnieris responsible for receiving incoming requests from
23000e68c0dSPhilippe Charnier.Tn NIS
23100e68c0dSPhilippe Charnierclients,
2320c319849SBill Paultranslating the requested domain and map name to a path to the
2330c319849SBill Paulcorresponding database file and transmitting data from the database
2340c319849SBill Paulback to the client. There is a specific set of requests that
2350c319849SBill Paul.Xr ypserv 8
2360c319849SBill Paulis designed to handle, most of which are implemented as functions
2370c319849SBill Paulwithin the standard C library:
2380c319849SBill Paul.Bl -bullet -offset indent
2390c319849SBill Paul.It
240edf0e5b3SMike Pritchard.Fn yp_order
2410c319849SBill Paul-- check the creation date of a particular map
2420c319849SBill Paul.It
243edf0e5b3SMike Pritchard.Fn yp_master
24400e68c0dSPhilippe Charnier-- obtain the name of the
24500e68c0dSPhilippe Charnier.Tn NIS
24600e68c0dSPhilippe Charniermaster server for a given
2470c319849SBill Paulmap/domain
2480c319849SBill Paul.It
249edf0e5b3SMike Pritchard.Fn yp_match
2500c319849SBill Paul-- lookup the data corresponding to a given in key in a particular
2510c319849SBill Paulmap/domain
2520c319849SBill Paul.It
253edf0e5b3SMike Pritchard.Fn yp_first
2540c319849SBill Paul-- obtain the first key/data pair in a particular map/domain
2550c319849SBill Paul.It
256edf0e5b3SMike Pritchard.Fn yp_next
2570c319849SBill Paul-- pass
2580c319849SBill Paul.Xr ypserv 8
2590c319849SBill Paula key in a particular map/domain and have it return the
260edf0e5b3SMike Pritchardkey/data pair immediately following it (the functions
261edf0e5b3SMike Pritchard.Fn yp_first
262edf0e5b3SMike Pritchardand
263edf0e5b3SMike Pritchard.Fn yp_next
26400e68c0dSPhilippe Charniercan be used to do a sequential search of an
26500e68c0dSPhilippe Charnier.Tn NIS
26600e68c0dSPhilippe Charniermap)
2670c319849SBill Paul.It
268edf0e5b3SMike Pritchard.Fn yp_all
2694a8d0283SMike Pritchard-- retrieve the entire contents of a map
2700c319849SBill Paul.El
2710c319849SBill Paul.Pp
2720c319849SBill PaulThere are a few other requests which
273edf0e5b3SMike Pritchard.Xr ypserv 8
2740c319849SBill Paulis capable of handling (i.e. acknowledge whether or not you can handle
2750c319849SBill Paula particular domain (YPPROC_DOMAIN), or acknowledge only if you can
2760c319849SBill Paulhandle the domain and be silent otherwise (YPPROC_DOMAIN_NONACK)) but
2770c319849SBill Paulthese requests are usually generated only by
278edf0e5b3SMike Pritchard.Xr ypbind 8
2790c319849SBill Pauland are not meant to be used by standard utilities.
2800c319849SBill Paul.Pp
2810c319849SBill PaulOn networks with a large number of hosts, it is often a good idea to
2820c319849SBill Pauluse a master server and several slaves rather than just a single master
2830c319849SBill Paulserver. A slave server provides the exact same information as a master
2840c319849SBill Paulserver: whenever the maps on the master server are updated, the new
2850c319849SBill Pauldata should be propagated to the slave systems using the
2860c319849SBill Paul.Xr yppush 8
28700e68c0dSPhilippe Charniercommand. The
28800e68c0dSPhilippe Charnier.Tn NIS
28900e68c0dSPhilippe CharnierMakefile
290dd5527c6SMike Pritchard.Pf ( Pa /var/yp/Makefile )
2910c319849SBill Paulwill do this automatically if the administrator comments out the
2920c319849SBill Paulline which says
2936a6c4c22SMike Pritchard.Em NOPUSH=true
2940c319849SBill Paul(NOPUSH is set to true by default because the default configuration is
29500e68c0dSPhilippe Charnierfor a small network with only one
29600e68c0dSPhilippe Charnier.Tn NIS
29700e68c0dSPhilippe Charnierserver). The
2980c319849SBill Paul.Xr yppush 8
2990c319849SBill Paulcommand will initiate a transaction between the master and slave
3000c319849SBill Paulduring which the slave will transfer the specified maps from the
3010c319849SBill Paulmaster server using
3020c319849SBill Paul.Xr ypxfr 8 .
3030c319849SBill Paul(The slave server calls
3040c319849SBill Paul.Xr ypxfr 8
3050c319849SBill Paulautomatically from within
3060c319849SBill Paul.Xr ypserv 8 ;
3070c319849SBill Paultherefore it is not usually necessary for the administrator
3080c319849SBill Paulto use it directly. It can be run manually if
3090c319849SBill Pauldesired, however.) Maintaining
31000e68c0dSPhilippe Charnierslave servers helps improve
31100e68c0dSPhilippe Charnier.Tn NIS
31200e68c0dSPhilippe Charnierperformance on large
3130c319849SBill Paulnetworks by:
3140c319849SBill Paul.Pp
3150c319849SBill Paul.Bl -bullet -offset indent
3160c319849SBill Paul.It
31700e68c0dSPhilippe CharnierProviding backup services in the event that the
31800e68c0dSPhilippe Charnier.Tn NIS
31900e68c0dSPhilippe Charniermaster crashes
3204a8d0283SMike Pritchardor becomes unreachable
3210c319849SBill Paul.It
3220c319849SBill PaulSpreading the client load out over several machines instead of
3230c319849SBill Paulcausing the master to become overloaded
3240c319849SBill Paul.It
32500e68c0dSPhilippe CharnierAllowing a single
32600e68c0dSPhilippe Charnier.Tn NIS
32700e68c0dSPhilippe Charnierdomain to extend beyond
3280c319849SBill Paula local network (the
3290c319849SBill Paul.Xr ypbind 8
3300c319849SBill Pauldaemon might not be able to locate a server automatically if it resides on
3310c319849SBill Paula network outside the reach of its broadcasts. It is possible to force
3320c319849SBill Paul.Xr ypbind 8
3330c319849SBill Paulto bind to a particular server with
3340c319849SBill Paul.Xr ypset 8
3350c319849SBill Paulbut this is sometimes inconvenient. This problem can be avoided simply by
3360c319849SBill Paulplacing a slave server on the local network.)
3370c319849SBill Paul.El
3380c319849SBill Paul.Pp
339dd5527c6SMike PritchardThe
34000e68c0dSPhilippe Charnier.Bx Free
3410c319849SBill Paul.Xr ypserv 8
3420c319849SBill Paulis specially designed to provided enhanced security (compared to
34300e68c0dSPhilippe Charnierother
34400e68c0dSPhilippe Charnier.Tn NIS
34500e68c0dSPhilippe Charnierimplementations) when used exclusively with
34600e68c0dSPhilippe Charnier.Bx Free
347dd5527c6SMike Pritchardclient
348dd5527c6SMike Pritchardsystems. The
34900e68c0dSPhilippe Charnier.Bx Free
350dd5527c6SMike Pritchardpassword database system (which is derived directly
35121421932SMike Pritchardfrom
35221421932SMike Pritchard.Bx 4.4 )
35321421932SMike Pritchardincludes support for
354edf0e5b3SMike Pritchard.Em "shadow passwords" .
3554a8d0283SMike PritchardThe standard password database does not contain users' encrypted
3560c319849SBill Paulpasswords: these are instead stored (along with other information)
3574a8d0283SMike Pritchardis a separate database which is accessible only by the super-user.
35800e68c0dSPhilippe CharnierIf the encrypted password database were made available as an
35900e68c0dSPhilippe Charnier.Tn NIS
3600c319849SBill Paulmap, this security feature would be totally disabled, since any user
36100e68c0dSPhilippe Charnieris allowed to retrieve
36200e68c0dSPhilippe Charnier.Tn NIS
36300e68c0dSPhilippe Charnierdata.
3640c319849SBill Paul.Pp
365dd5527c6SMike PritchardTo help prevent this,
36600e68c0dSPhilippe Charnier.Bx Free Ns 's
36700e68c0dSPhilippe Charnier.Tn NIS
36800e68c0dSPhilippe Charnierserver handles the shadow password maps
369dd5527c6SMike Pritchard.Pf ( Pa master.passwd.byname
3700c319849SBill Pauland
3710c319849SBill Paul.Pa master.passwd.byuid )
3720c319849SBill Paulin a special way: the server will only provide access to these
3730c319849SBill Paulmaps in response to requests that originate on privileged ports.
3740c319849SBill PaulSince only the super-user is allowed to bind to a privileged port,
3750c319849SBill Paulthe server assumes that all such requests come from privileged
3760c319849SBill Paulusers. All other requests are denied: requests from non-privileged
3770c319849SBill Paulports will receive only an error code from the server. Additionally,
37800e68c0dSPhilippe Charnier.Bx Free Ns 's
3790c319849SBill Paul.Xr ypserv 8
3800c319849SBill Paulincludes support for Wietse Venema's tcp wrapper package; with tcp
3810c319849SBill Paulwrapper support enabled, the administrator can configure
3820c319849SBill Paul.Xr ypserv 8
3830c319849SBill Paulto respond only to selected client machines.
3840c319849SBill Paul.Pp
38500e68c0dSPhilippe CharnierWhile these enhancements provide better security than stock
38600e68c0dSPhilippe Charnier.Tn NIS Ns ,
3870c319849SBill Paulthey are by no means 100% effective. It is still possible for
3880c319849SBill Paulsomeone with access to your network to spoof the server into disclosing
3890c319849SBill Paulthe shadow password maps.
3900c319849SBill Paul.Pp
391dd5527c6SMike PritchardOn the client side,
39200e68c0dSPhilippe Charnier.Bx Free Ns 's
3930c319849SBill Paul.Fn getpwent 3
3940c319849SBill Paulfunctions will automatically search for the
3950c319849SBill Paul.Pa master.passwd
3960c319849SBill Paulmaps and use them if they exist. If they do, they will be used, and
3970c319849SBill Paulall fields in these special maps (class, password age and account
3980c319849SBill Paulexpiration) will be decoded. If they aren't found, the standard
3990c319849SBill Paul.Pa passwd
4000c319849SBill Paulmaps will be used instead.
4010c319849SBill Paul.Sh COMPATIBILITY
40200e68c0dSPhilippe CharnierSome systems, such as SunOS 4.x, need
40300e68c0dSPhilippe Charnier.Tn NIS
40400e68c0dSPhilippe Charnierto be running in order
4050c319849SBill Paulfor their hostname resolution functions (
4060c319849SBill Paul.Fn gethostbyname ,
4070c319849SBill Paul.Fn gethostbyaddr ,
4080c319849SBill Pauletc) to work properly. On these systems,
4090c319849SBill Paul.Xr ypserv 8
41000e68c0dSPhilippe Charnierperforms
41100e68c0dSPhilippe Charnier.Tn DNS
41200e68c0dSPhilippe Charnierlookups when asked to return information about
4130c319849SBill Paula host that doesn't exist in its
4140c319849SBill Paul.Pa hosts.byname
4150c319849SBill Paulor
4160c319849SBill Paul.Pa hosts.byaddr
417dd5527c6SMike Pritchardmaps.
41800e68c0dSPhilippe Charnier.Bx Free Ns 's
41900e68c0dSPhilippe Charnierresolver uses
42000e68c0dSPhilippe Charnier.Tn DNS
42100e68c0dSPhilippe Charnierby default (it can be made to use
42200e68c0dSPhilippe Charnier.Tn NIS Ns ,
42300e68c0dSPhilippe Charnierif desired), therefore its
42400e68c0dSPhilippe Charnier.Tn NIS
42500e68c0dSPhilippe Charnierserver doesn't do
42600e68c0dSPhilippe CharnierTn DNS
42700e68c0dSPhilippe Charnierlookups
4280c319849SBill Paulby default. However,
4290c319849SBill Paul.Xr ypserv 8
43000e68c0dSPhilippe Charniercan be made to perform
43100e68c0dSPhilippe Charnier.Tn DNS
43200e68c0dSPhilippe Charnierlookups if it is started with a special
43300e68c0dSPhilippe Charnierflag. It can also be made to register itself as an
43400e68c0dSPhilippe Charnier.Tn NIS
43500e68c0dSPhilippe Charnierv1 server
4360c319849SBill Paulin order to placate certain systems that insist on the presence of
437dd5527c6SMike Pritcharda v1 server
43800e68c0dSPhilippe Charnier.Pf ( Bx Free
43900e68c0dSPhilippe Charnieruses only
44000e68c0dSPhilippe Charnier.Tn NIS
44100e68c0dSPhilippe Charnierv2, but many other systems,
442dd5527c6SMike Pritchardincluding
443dd5527c6SMike Pritchard.Tn SunOS
444dd5527c6SMike Pritchard4.x, search for both a v1 and v2 server when binding).
44500e68c0dSPhilippe Charnier.Bx Free Ns 's
4460c319849SBill Paul.Xr ypserv 8
44700e68c0dSPhilippe Charnierdoes not actually handle
44800e68c0dSPhilippe Charnier.Tn NIS
44900e68c0dSPhilippe Charnierv1 requests, but this ``kludge mode''
4500c319849SBill Paulis useful for silencing stubborn systems that search for both
4510c319849SBill Paula v1 and v2 server.
4520c319849SBill Paul.Pp
4530c319849SBill Paul(Please see the
4540c319849SBill Paul.Xr ypserv 8
4550c319849SBill Paulmanual page for a detailed description of these special features
4560c319849SBill Pauland flags.)
4570c319849SBill Paul.Sh BUGS
458dd5527c6SMike PritchardWhile
45900e68c0dSPhilippe Charnier.Bx Free
46000e68c0dSPhilippe Charniernow has both
46100e68c0dSPhilippe Charnier.Tn NIS
46200e68c0dSPhilippe Charnierclient and server capabilities, it does not yet have support for
4636a6c4c22SMike Pritchard.Xr ypupdated 8
4640c319849SBill Paulor the
4650c319849SBill Paul.Fn yp_update
46600e68c0dSPhilippe Charnierfunction. Both of these require secure
46700e68c0dSPhilippe Charnier.Tn RPC Ns ,
46800e68c0dSPhilippe Charnierwhich
46900e68c0dSPhilippe Charnier.Bx Free
470dd5527c6SMike Pritcharddoesn't
4710c319849SBill Paulsupport yet either.
4720c319849SBill Paul.Pp
4730c319849SBill PaulThe
4740c319849SBill Paul.Xr getservent 3
4750c319849SBill Pauland
4760c319849SBill Paul.Xr getprotoent 3
47700e68c0dSPhilippe Charnierfunctions do not yet have
47800e68c0dSPhilippe Charnier.Tn NIS
47900e68c0dSPhilippe Charniersupport. Fortunately, these files
4800c319849SBill Pauldon't need to be updated that often.
4810c319849SBill Paul.Pp
482edf0e5b3SMike PritchardMany more manual pages should be written, especially
483edf0e5b3SMike Pritchard.Xr ypclnt 3 .
484c1d06ca1SGarrett WollmanFor the time being, seek out a local Sun machine and read the
485c1d06ca1SGarrett Wollmanmanuals for there.
4860c319849SBill Paul.Pp
487c1d06ca1SGarrett WollmanNeither Sun nor this author have found a clean way to handle
488c1d06ca1SGarrett Wollmanthe problems that occur when ypbind cannot find its server
489c1d06ca1SGarrett Wollmanupon bootup.
490c1d06ca1SGarrett Wollman.Sh HISTORY
491c1d06ca1SGarrett WollmanThe
492c1d06ca1SGarrett Wollman.Nm YP
49300e68c0dSPhilippe Charniersubsystem was written from the ground up by
49400e68c0dSPhilippe Charnier.An Theo de Raadt
4954a8d0283SMike Pritchardto be compatible to Sun's implementation. Bug fixes, improvements
49600e68c0dSPhilippe Charnierand
49700e68c0dSPhilippe Charnier.Tn NIS
49800e68c0dSPhilippe Charnierserver support were later added by
49900e68c0dSPhilippe Charnier.An Bill Paul Ns .
50000e68c0dSPhilippe CharnierThe server-side code was originally written by
50100e68c0dSPhilippe Charnier.An Peter Eriksson
50200e68c0dSPhilippe Charnierand
50300e68c0dSPhilippe Charnier.An Tobias Reber
50400e68c0dSPhilippe Charnierand is subject to the GNU Public License. No Sun code was
505c1d06ca1SGarrett Wollmanreferenced.
506