xref: /freebsd/usr.sbin/ypserv/ypserv.8 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1778c7b1cSBill Paul.\" Copyright (c) 1995
2778c7b1cSBill Paul.\"	Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.
3778c7b1cSBill Paul.\"
4778c7b1cSBill Paul.\" Redistribution and use in source and binary forms, with or without
5778c7b1cSBill Paul.\" modification, are permitted provided that the following conditions
6778c7b1cSBill Paul.\" are met:
7778c7b1cSBill Paul.\" 1. Redistributions of source code must retain the above copyright
8778c7b1cSBill Paul.\"    notice, this list of conditions and the following disclaimer.
9778c7b1cSBill Paul.\" 2. Redistributions in binary form must reproduce the above copyright
10778c7b1cSBill Paul.\"    notice, this list of conditions and the following disclaimer in the
11778c7b1cSBill Paul.\"    documentation and/or other materials provided with the distribution.
12778c7b1cSBill Paul.\" 3. All advertising materials mentioning features or use of this software
13778c7b1cSBill Paul.\"    must display the following acknowledgement:
14778c7b1cSBill Paul.\"	This product includes software developed by Bill Paul.
15778c7b1cSBill Paul.\" 4. Neither the name of the author nor the names of any co-contributors
16778c7b1cSBill Paul.\"    may be used to endorse or promote products derived from this software
17778c7b1cSBill Paul.\"    without specific prior written permission.
18778c7b1cSBill Paul.\"
19778c7b1cSBill Paul.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
20778c7b1cSBill Paul.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21778c7b1cSBill Paul.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22778c7b1cSBill Paul.\" ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE
23778c7b1cSBill Paul.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24778c7b1cSBill Paul.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25778c7b1cSBill Paul.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26778c7b1cSBill Paul.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27778c7b1cSBill Paul.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28778c7b1cSBill Paul.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29778c7b1cSBill Paul.\" SUCH DAMAGE.
30778c7b1cSBill Paul.\"
31f96264e3SHiroki Sato.Dd December 13, 2009
32778c7b1cSBill Paul.Dt YPSERV 8
33778c7b1cSBill Paul.Os
34778c7b1cSBill Paul.Sh NAME
35778c7b1cSBill Paul.Nm ypserv
366ecb7b20SJohn-Mark Gurney.Nd NIS database server
37778c7b1cSBill Paul.Sh SYNOPSIS
386ecb7b20SJohn-Mark Gurney.Nm
39778c7b1cSBill Paul.Op Fl n
40778c7b1cSBill Paul.Op Fl d
413868f70eSMatteo Riondato.Op Fl P Ar port
42778c7b1cSBill Paul.Op Fl p Ar path
43778c7b1cSBill Paul.Sh DESCRIPTION
446ecb7b20SJohn-Mark Gurney.Tn NIS
45778c7b1cSBill Paulis an RPC-based service designed to allow a number of UNIX-based
46f2e366a1SSheldon Hearnmachines to share a common set of configuration files.
47f2e366a1SSheldon HearnRather than
48778c7b1cSBill Paulrequiring a system administrator to update several copies of files
49778c7b1cSBill Paulsuch as
50778c7b1cSBill Paul.Pa /etc/hosts ,
51778c7b1cSBill Paul.Pa /etc/passwd
52778c7b1cSBill Pauland
53778c7b1cSBill Paul.Pa /etc/group ,
5498834523SPhilippe Charnierwhich tend to require frequent changes in most environments,
5598834523SPhilippe Charnier.Tn NIS
56778c7b1cSBill Paulallows groups of computers to share one set of data which can be
57778c7b1cSBill Paulupdated from a single location.
58778c7b1cSBill Paul.Pp
596ecb7b20SJohn-Mark GurneyThe
606ecb7b20SJohn-Mark Gurney.Nm
61490d5836SPhilippe Charnierutility is the server that distributes
6298834523SPhilippe Charnier.Tn NIS
6398834523SPhilippe Charnierdatabases to client systems within an
6498834523SPhilippe Charnier.Tn NIS
656ecb7b20SJohn-Mark Gurney.Em domain .
6698834523SPhilippe CharnierEach client in an
6798834523SPhilippe Charnier.Tn NIS
6898834523SPhilippe Charnierdomain must have its domainname set to
69778c7b1cSBill Paulone of the domains served by
706ecb7b20SJohn-Mark Gurney.Nm
71778c7b1cSBill Paulusing the
72778c7b1cSBill Paul.Xr domainname 1
73f2e366a1SSheldon Hearncommand.
74f2e366a1SSheldon HearnThe clients must also run
75778c7b1cSBill Paul.Xr ypbind 8
76778c7b1cSBill Paulin order to attach to a particular server, since it is possible to
7798834523SPhilippe Charnierhave several servers within a single
7898834523SPhilippe Charnier.Tn NIS
7998834523SPhilippe Charnierdomain.
80778c7b1cSBill Paul.Pp
81778c7b1cSBill PaulThe databases distributed by
826ecb7b20SJohn-Mark Gurney.Nm
83778c7b1cSBill Paulare stored in
84778c7b1cSBill Paul.Pa /var/yp/[domainname]
85778c7b1cSBill Paulwhere
86778c7b1cSBill Paul.Pa domainname
87f2e366a1SSheldon Hearnis the name of the domain being served.
88f2e366a1SSheldon HearnThere can be several
89778c7b1cSBill Paulsuch directories with different domainnames, and you need only one
906ecb7b20SJohn-Mark Gurney.Nm
91778c7b1cSBill Pauldaemon to handle them all.
92778c7b1cSBill Paul.Pp
93778c7b1cSBill PaulThe databases, or
94778c7b1cSBill Paul.Pa maps
95778c7b1cSBill Paulas they are often called,
96778c7b1cSBill Paulare created by
976ecb7b20SJohn-Mark Gurney.Pa /var/yp/Makefile
98f2e366a1SSheldon Hearnusing several system files as source.
99f2e366a1SSheldon HearnThe database files are in
100778c7b1cSBill Paul.Xr db 3
101778c7b1cSBill Paulformat to help speed retrieval when there are many records involved.
10298834523SPhilippe CharnierIn
10314201ae6SMike Pritchard.Fx ,
10498834523SPhilippe Charnierthe maps are always readable and writable only by root for security
105f2e366a1SSheldon Hearnreasons.
106f2e366a1SSheldon HearnTechnically this is only necessary for the password
107778c7b1cSBill Paulmaps, but since the data in the other maps can be found in
10836a142c4SRuslan Ermilovother world-readable files anyway, it does not hurt and it is considered
109778c7b1cSBill Paulgood general practice.
110778c7b1cSBill Paul.Pp
1116ecb7b20SJohn-Mark GurneyThe
1126ecb7b20SJohn-Mark Gurney.Nm
113490d5836SPhilippe Charnierutility is started by
1143a3f8378SMike Makonnen.Pa /etc/rc.d/ypserv
115778c7b1cSBill Paulif it has been enabled in
11698834523SPhilippe Charnier.Pa /etc/rc.conf .
117778c7b1cSBill Paul.Sh SPECIAL FEATURES
11814201ae6SMike PritchardThere are some problems associated with distributing a
11914201ae6SMike Pritchard.Fx
12014201ae6SMike Pritchardpassword
12198834523SPhilippe Charnierdatabase via
122a654c53eSRuslan Ermilov.Tn NIS :
12314201ae6SMike Pritchard.Fx
12498834523SPhilippe Charniernormally only stores encrypted passwords
125778c7b1cSBill Paulin
126778c7b1cSBill Paul.Pa /etc/master.passwd ,
127f2e366a1SSheldon Hearnwhich is readable and writable only by root.
128f2e366a1SSheldon HearnBy turning this file
12998834523SPhilippe Charnierinto an
13098834523SPhilippe Charnier.Tn NIS
13198834523SPhilippe Charniermap, this security feature would be completely defeated.
132778c7b1cSBill Paul.Pp
13398834523SPhilippe CharnierTo make up for this, the
13414201ae6SMike Pritchard.Fx
13598834523SPhilippe Charnierversion of
1366ecb7b20SJohn-Mark Gurney.Nm
137778c7b1cSBill Paulhandles the
138778c7b1cSBill Paul.Pa master.passwd.byname
139778c7b1cSBill Pauland
140c192455bSJeroen Ruigrok van der Werven.Pa master.passwd.byuid
141f2e366a1SSheldon Hearnmaps in a special way.
142f2e366a1SSheldon HearnWhen the server receives a request to access
14353c40578SBrian Somerseither of these two maps (or in fact either of the
14453c40578SBrian Somers.Pa shadow.byname
14553c40578SBrian Somersor
14653c40578SBrian Somers.Pa shadow.byuid
14753c40578SBrian Somersmaps), it will check the TCP port from which the
148778c7b1cSBill Paulrequest originated and return an error if the port number is greater
1494e86fcacSSheldon Hearnthan 1023.
1504e86fcacSSheldon HearnSince only the superuser is allowed to bind to TCP ports
151778c7b1cSBill Paulwith values less than 1024, the server can use this test to determine
152778c7b1cSBill Paulwhether or not the access request came from a privileged user.
153778c7b1cSBill PaulAny requests made by non-privileged users are therefore rejected.
154778c7b1cSBill Paul.Pp
155778c7b1cSBill PaulFurthermore, the
156778c7b1cSBill Paul.Xr getpwent 3
15714201ae6SMike Pritchardroutines in the
15814201ae6SMike Pritchard.Fx
15998834523SPhilippe Charnierstandard C library will only attempt to retrieve
160778c7b1cSBill Pauldata from the
161778c7b1cSBill Paul.Pa master.passwd.byname
162778c7b1cSBill Pauland
163778c7b1cSBill Paul.Pa master.passwd.byuid
164778c7b1cSBill Paulmaps for the superuser: if a normal user calls any of these functions,
165778c7b1cSBill Paulthe standard
166778c7b1cSBill Paul.Pa passwd.byname
167778c7b1cSBill Pauland
168778c7b1cSBill Paul.Pa passwd.byuid
169f2e366a1SSheldon Hearnmaps will be accessed instead.
170f2e366a1SSheldon HearnThe latter two maps are constructed by
1716ecb7b20SJohn-Mark Gurney.Pa /var/yp/Makefile
172778c7b1cSBill Paulby parsing the
173778c7b1cSBill Paul.Pa master.passwd
174778c7b1cSBill Paulfile and stripping out the password fields, and are therefore
175f2e366a1SSheldon Hearnsafe to pass on to unprivileged users.
176f2e366a1SSheldon HearnIn this way, the shadow password
177778c7b1cSBill Paulaspect of the protected
178778c7b1cSBill Paul.Pa master.passwd
17998834523SPhilippe Charnierdatabase is maintained through
18098834523SPhilippe Charnier.Tn NIS .
181778c7b1cSBill Paul.Sh NOTES
18242e3d43bSGuy Helmer.Ss Setting Up Master and Slave Servers
18342e3d43bSGuy Helmer.Xr ypinit 8
18442e3d43bSGuy Helmeris a convenient script that will help setup master and slave
18542e3d43bSGuy Helmer.Tn NIS
18642e3d43bSGuy Helmerservers.
187778c7b1cSBill Paul.Ss Limitations
18898834523SPhilippe CharnierThere are two problems inherent with password shadowing in
18998834523SPhilippe Charnier.Tn NIS
190778c7b1cSBill Paulthat users should
191778c7b1cSBill Paulbe aware of:
192778c7b1cSBill Paul.Bl -enum -offset indent
193778c7b1cSBill Paul.It
1946ecb7b20SJohn-Mark GurneyThe
1956ecb7b20SJohn-Mark Gurney.Sq TCP port less than 1024
1966ecb7b20SJohn-Mark Gurneytest is trivial to defeat for users with
197778c7b1cSBill Paulunrestricted access to machines on your network (even those machines
198778c7b1cSBill Paulwhich do not run UNIX-based operating systems).
199778c7b1cSBill Paul.It
20098834523SPhilippe CharnierIf you plan to use a
20114201ae6SMike Pritchard.Fx
20298834523SPhilippe Charniersystem to serve
203b5c508fbSRuslan Ermilov.No non- Ns Fx
20498834523SPhilippe Charnierclients that
205778c7b1cSBill Paulhave no support for password shadowing (which is most of them), you
206778c7b1cSBill Paulwill have to disable the password shadowing entirely by uncommenting the
2076ecb7b20SJohn-Mark Gurney.Em UNSECURE=True
208778c7b1cSBill Paulentry in
2096ecb7b20SJohn-Mark Gurney.Pa /var/yp/Makefile .
210778c7b1cSBill PaulThis will cause the standard
211778c7b1cSBill Paul.Pa passwd.byname
212778c7b1cSBill Pauland
213778c7b1cSBill Paul.Pa passwd.byuid
214778c7b1cSBill Paulmaps to be generated with valid encrypted password fields, which is
21598834523SPhilippe Charniernecessary in order for
216b5c508fbSRuslan Ermilov.No non- Ns Fx
21798834523SPhilippe Charnierclients to perform user
21898834523SPhilippe Charnierauthentication through
21998834523SPhilippe Charnier.Tn NIS .
220778c7b1cSBill Paul.El
221778c7b1cSBill Paul.Ss Security
222f7f470a8SBill PaulIn general, any remote user can issue an RPC to
2236ecb7b20SJohn-Mark Gurney.Nm
22498834523SPhilippe Charnierand retrieve the contents of your
22598834523SPhilippe Charnier.Tn NIS
22698834523SPhilippe Charniermaps, provided the remote user
227f2e366a1SSheldon Hearnknows your domain name.
228f2e366a1SSheldon HearnTo prevent such unauthorized transactions,
2296ecb7b20SJohn-Mark Gurney.Nm
230f7f470a8SBill Paulsupports a feature called
231f7f470a8SBill Paul.Pa securenets
232f7f470a8SBill Paulwhich can be used to restrict access to a given set of hosts.
233f7f470a8SBill PaulAt startup,
2346ecb7b20SJohn-Mark Gurney.Nm
235f7f470a8SBill Paulwill attempt to load the securenets information from a file
236f7f470a8SBill Paulcalled
2376ecb7b20SJohn-Mark Gurney.Pa /var/yp/securenets .
238f7f470a8SBill Paul(Note that this path varies depending on the path specified with
239f7f470a8SBill Paulthe
240f7f470a8SBill Paul.Fl p
2414e86fcacSSheldon Hearnoption, which is explained below.)
2424e86fcacSSheldon HearnThis file contains entries
243f7f470a8SBill Paulthat consist of a network specification and a network mask separated
244f7f470a8SBill Paulby white space.
2456ecb7b20SJohn-Mark GurneyLines starting with
2466ecb7b20SJohn-Mark Gurney.Dq \&#
247f2e366a1SSheldon Hearnare considered to be comments.
248f2e366a1SSheldon HearnA
249f7f470a8SBill Paulsample securenets file might look like this:
250f7f470a8SBill Paul.Bd -unfilled -offset indent
251f7f470a8SBill Paul# allow connections from local host -- mandatory
252f7f470a8SBill Paul127.0.0.1     255.255.255.255
253f7f470a8SBill Paul# allow connections from any host
25450aedc81SJustin M. Seger# on the 192.168.128.0 network
255f7f470a8SBill Paul192.168.128.0 255.255.255.0
256f7f470a8SBill Paul# allow connections from any host
257f7f470a8SBill Paul# between 10.0.0.0 to 10.0.15.255
258f7f470a8SBill Paul10.0.0.0      255.255.240.0
259f7f470a8SBill Paul.Ed
260f7f470a8SBill Paul.Pp
261f7f470a8SBill PaulIf
2626ecb7b20SJohn-Mark Gurney.Nm
263f7f470a8SBill Paulreceives a request from an address that matches one of these rules,
264f2e366a1SSheldon Hearnit will process the request normally.
265f2e366a1SSheldon HearnIf the address fails to match
266f7f470a8SBill Paula rule, the request will be ignored and a warning message will be
267f2e366a1SSheldon Hearnlogged.
268f2e366a1SSheldon HearnIf the
269f7f470a8SBill Paul.Pa /var/yp/securenets
270f7f470a8SBill Paulfile does not exist,
2716ecb7b20SJohn-Mark Gurney.Nm
272f7f470a8SBill Paulwill allow connections from any host.
273f7f470a8SBill Paul.Pp
2746ecb7b20SJohn-Mark GurneyThe
2756ecb7b20SJohn-Mark Gurney.Nm
276490d5836SPhilippe Charnierutility also has support for Wietse Venema's
2776ecb7b20SJohn-Mark Gurney.Em tcpwrapper
2789c7e3cbfSMark Murraypackage.
279f2e366a1SSheldon HearnThis allows the administrator to use the tcpwrapper
28094ba280cSRuslan Ermilovconfiguration files
28194ba280cSRuslan Ermilov.Pa ( /etc/hosts.allow
282f7f470a8SBill Pauland
283f7f470a8SBill Paul.Pa /etc/hosts.deny )
284f7f470a8SBill Paulfor access control instead of
285f7f470a8SBill Paul.Pa /var/yp/securenets .
286f7f470a8SBill Paul.Pp
287f7f470a8SBill PaulNote: while both of these access control mechanisms provide some
288f7f470a8SBill Paulsecurity, they, like the privileged port test, are both vulnerable
2896ecb7b20SJohn-Mark Gurneyto
2906ecb7b20SJohn-Mark Gurney.Dq IP spoofing
2916ecb7b20SJohn-Mark Gurneyattacks.
2929573c1f1SBill Paul.Ss NIS v1 compatibility
2939573c1f1SBill PaulThis version of
2946ecb7b20SJohn-Mark Gurney.Nm
29598834523SPhilippe Charnierhas some support for serving
29698834523SPhilippe Charnier.Tn NIS
29798834523SPhilippe Charnierv1 clients.
29814201ae6SMike PritchardThe
29914201ae6SMike Pritchard.Fx
30098834523SPhilippe Charnier.Tn NIS
30198834523SPhilippe Charnierimplementation only uses the
30298834523SPhilippe Charnier.Tn NIS
30398834523SPhilippe Charnierv2 protocol, however other implementations
3049abcd271SGuido van Rooijinclude support for the v1 protocol for backwards compatibility
305f2e366a1SSheldon Hearnwith older systems.
306f2e366a1SSheldon HearnThe
3079573c1f1SBill Paul.Xr ypbind 8
3089573c1f1SBill Pauldaemons supplied with these systems will try to establish a binding
30998834523SPhilippe Charnierto an
31098834523SPhilippe Charnier.Tn NIS
31198834523SPhilippe Charnierv1 server even though they may never actually need it (and they may
3129573c1f1SBill Paulpersist in broadcasting in search of one even after they receive a
31307bfccd7SRuslan Ermilovresponse from a v2 server).
31407bfccd7SRuslan ErmilovNote that while
3159573c1f1SBill Paulsupport for normal client calls is provided, this version of
3166ecb7b20SJohn-Mark Gurney.Nm
3179573c1f1SBill Pauldoes not handle v1 map transfer requests; consequently, it cannot
31898834523SPhilippe Charnierbe used as a master or slave in conjunction with older
31998834523SPhilippe Charnier.Tn NIS
32098834523SPhilippe Charnierservers that
321f2e366a1SSheldon Hearnonly support the v1 protocol.
3220227791bSRuslan ErmilovFortunately, there probably are not any
3239573c1f1SBill Paulsuch servers still in use today.
324778c7b1cSBill Paul.Ss NIS servers that are also NIS clients
325778c7b1cSBill PaulCare must be taken when running
3266ecb7b20SJohn-Mark Gurney.Nm
327778c7b1cSBill Paulin a multi-server domain where the server machines are also
32898834523SPhilippe Charnier.Tn NIS
329f2e366a1SSheldon Hearnclients.
330f2e366a1SSheldon HearnIt is generally a good idea to force the servers to
331778c7b1cSBill Paulbind to themselves rather than allowing them to broadcast bind
332778c7b1cSBill Paulrequests and possibly become bound to each other: strange failure
333778c7b1cSBill Paulmodes can result if one server goes down and
3344e86fcacSSheldon Hearnothers are dependent upon on it.
3354e86fcacSSheldon Hearn(Eventually all the clients will
336778c7b1cSBill Paultime out and attempt to bind to other servers, but the delay
337778c7b1cSBill Paulinvolved can be considerable and the failure mode is still present
338778c7b1cSBill Paulsince the servers might bind to each other all over again).
339778c7b1cSBill Paul.Pp
340778c7b1cSBill PaulRefer to the
341778c7b1cSBill Paul.Xr ypbind 8
342778c7b1cSBill Paulman page for details on how to force it to bind to a particular
343778c7b1cSBill Paulserver.
344778c7b1cSBill Paul.Sh OPTIONS
345778c7b1cSBill PaulThe following options are supported by
346e97407b4SRuslan Ermilov.Nm :
347778c7b1cSBill Paul.Bl -tag -width flag
348778c7b1cSBill Paul.It Fl n
349778c7b1cSBill PaulThis option affects the way
3506ecb7b20SJohn-Mark Gurney.Nm
351778c7b1cSBill Paulhandles yp_match requests for the
352778c7b1cSBill Paul.Pa hosts.byname
353778c7b1cSBill Pauland
354778c7b1cSBill Paul.Pa hosts.byaddress
355f2e366a1SSheldon Hearnmaps.
356f2e366a1SSheldon HearnBy default, if
3576ecb7b20SJohn-Mark Gurney.Nm
3580227791bSRuslan Ermilovcannot find an entry for a given host in its hosts maps, it will
359f2e366a1SSheldon Hearnreturn an error and perform no further processing.
360f2e366a1SSheldon HearnWith the
361778c7b1cSBill Paul.Fl n
362778c7b1cSBill Paulflag,
3636ecb7b20SJohn-Mark Gurney.Nm
364778c7b1cSBill Paulwill go one step further: rather than giving up immediately, it
365778c7b1cSBill Paulwill try to resolve the hostname or address using a DNS nameserver
366f2e366a1SSheldon Hearnquery.
367f2e366a1SSheldon HearnIf the query is successful,
3686ecb7b20SJohn-Mark Gurney.Nm
369778c7b1cSBill Paulwill construct a fake database record and return it to the client,
370778c7b1cSBill Paulthereby making it seem as though the client's yp_match request
371778c7b1cSBill Paulsucceeded.
372778c7b1cSBill Paul.Pp
37357bd0fc6SJens SchweikhardtThis feature is provided for compatibility with SunOS 4.1.x,
374778c7b1cSBill Paulwhich has brain-damaged resolver functions in its standard C
37598834523SPhilippe Charnierlibrary that depend on
37698834523SPhilippe Charnier.Tn NIS
37798834523SPhilippe Charnierfor hostname and address resolution.
37814201ae6SMike PritchardThe
37914201ae6SMike Pritchard.Fx
38098834523SPhilippe Charnierresolver can be configured to do DNS
381778c7b1cSBill Paulqueries directly, therefore it is not necessary to enable this
38298834523SPhilippe Charnieroption when serving only
38314201ae6SMike Pritchard.Fx
38498834523SPhilippe Charnier.Tn NIS
38598834523SPhilippe Charnierclients.
386778c7b1cSBill Paul.It Fl d
387f2e366a1SSheldon HearnCause the server to run in debugging mode.
388f2e366a1SSheldon HearnNormally,
3896ecb7b20SJohn-Mark Gurney.Nm
390778c7b1cSBill Paulreports only unusual errors (access violations, file access failures)
391778c7b1cSBill Paulusing the
392778c7b1cSBill Paul.Xr syslog 3
393f2e366a1SSheldon Hearnfacility.
394f2e366a1SSheldon HearnIn debug mode, the server does not background
395778c7b1cSBill Paulitself and prints extra status messages to stderr for each
396f2e366a1SSheldon Hearnrequest that it receives.
397f2e366a1SSheldon HearnAlso, while running in debug mode,
3986ecb7b20SJohn-Mark Gurney.Nm
399778c7b1cSBill Paulwill not spawn any additional subprocesses as it normally does
4004e86fcacSSheldon Hearnwhen handling yp_all requests or doing DNS lookups.
4014e86fcacSSheldon Hearn(These actions
402778c7b1cSBill Pauloften take a fair amount of time to complete and are therefore handled
403778c7b1cSBill Paulin subprocesses, allowing the parent server process to go on handling
4044e86fcacSSheldon Hearnother requests.)
4054e86fcacSSheldon HearnThis makes it easier to trace the server with
406778c7b1cSBill Paula debugging tool.
407f96264e3SHiroki Sato.It Fl h Ar addr
408f96264e3SHiroki SatoSpecify a specific address to bind to for requests.  This option may be
409f96264e3SHiroki Satospecified multiple times.  If no
410f96264e3SHiroki Sato.Fl h
411f96264e3SHiroki Satooption is specified,
412f96264e3SHiroki Sato.Nm
413f96264e3SHiroki Satowill bind to default passive address
414f96264e3SHiroki Sato.Pq e.g. INADDR_ANY for IPv4
415f96264e3SHiroki Satofor each transport.
4163868f70eSMatteo Riondato.It Fl P Ar port
4173868f70eSMatteo RiondatoForce ypserv to bind to a specific TCP/UDP port, rather than selecting
4183868f70eSMatteo Riondatoits own.
419778c7b1cSBill Paul.It Fl p Ar path
420778c7b1cSBill PaulNormally,
4216ecb7b20SJohn-Mark Gurney.Nm
42298834523SPhilippe Charnierassumes that all
42398834523SPhilippe Charnier.Tn NIS
42498834523SPhilippe Charniermaps are stored under
425778c7b1cSBill Paul.Pa /var/yp .
426778c7b1cSBill PaulThe
427778c7b1cSBill Paul.Fl p
42898834523SPhilippe Charnierflag may be used to specify an alternate
42998834523SPhilippe Charnier.Tn NIS
43098834523SPhilippe Charnierroot path, allowing
431778c7b1cSBill Paulthe system administrator to move the map files to a different place
432778c7b1cSBill Paulwithin the file system.
433778c7b1cSBill Paul.El
434778c7b1cSBill Paul.Sh FILES
435778c7b1cSBill Paul.Bl -tag -width Pa -compact
436778c7b1cSBill Paul.It Pa /var/yp/[domainname]/[maps]
43798834523SPhilippe Charnierthe
43898834523SPhilippe Charnier.Tn NIS
43998834523SPhilippe Charniermaps
440248aee62SJacques Vidrine.It Pa /etc/nsswitch.conf
441248aee62SJacques Vidrinename switch configuration file
442f7f470a8SBill Paul.It Pa /var/yp/securenets
44398834523SPhilippe Charnierhost access control file
444778c7b1cSBill Paul.El
445778c7b1cSBill Paul.Sh SEE ALSO
446906c1e27SMike Pritchard.Xr ypcat 1 ,
447906c1e27SMike Pritchard.Xr db 3 ,
4489c7e3cbfSMark Murray.Xr hosts_access 5 ,
44932fdc705SMike Pritchard.Xr rpc.yppasswdd 8 ,
450491a8429SRuslan Ermilov.Xr yp 8 ,
451778c7b1cSBill Paul.Xr ypbind 8 ,
45242e3d43bSGuy Helmer.Xr ypinit 8 ,
453778c7b1cSBill Paul.Xr yppush 8 ,
454906c1e27SMike Pritchard.Xr ypxfr 8
455778c7b1cSBill Paul.Sh HISTORY
456778c7b1cSBill PaulThis version of
4576ecb7b20SJohn-Mark Gurney.Nm
45885cf659aSMike Pritchardfirst appeared in
45985cf659aSMike Pritchard.Fx 2.2 .
46059a3c79dSRuslan Ermilov.Sh AUTHORS
461*01c2b8acSBaptiste Daroussin.An Bill Paul Aq Mt wpaul@ctr.columbia.edu
462