xref: /freebsd/usr.sbin/ypbind/ypbind.8 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
12d91aab7SBill Paul.\" Copyright (c) 1991, 1993, 1995
22d91aab7SBill Paul.\"	The Regents of the University of California.  All rights reserved.
32d91aab7SBill Paul.\"
42d91aab7SBill Paul.\" Redistribution and use in source and binary forms, with or without
52d91aab7SBill Paul.\" modification, are permitted provided that the following conditions
62d91aab7SBill Paul.\" are met:
72d91aab7SBill Paul.\" 1. Redistributions of source code must retain the above copyright
82d91aab7SBill Paul.\"    notice, this list of conditions and the following disclaimer.
92d91aab7SBill Paul.\" 2. Redistributions in binary form must reproduce the above copyright
102d91aab7SBill Paul.\"    notice, this list of conditions and the following disclaimer in the
112d91aab7SBill Paul.\"    documentation and/or other materials provided with the distribution.
12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
132d91aab7SBill Paul.\"    may be used to endorse or promote products derived from this software
142d91aab7SBill Paul.\"    without specific prior written permission.
152d91aab7SBill Paul.\"
162d91aab7SBill Paul.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
172d91aab7SBill Paul.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
182d91aab7SBill Paul.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
192d91aab7SBill Paul.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
202d91aab7SBill Paul.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
212d91aab7SBill Paul.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
222d91aab7SBill Paul.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
232d91aab7SBill Paul.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
242d91aab7SBill Paul.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
252d91aab7SBill Paul.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
262d91aab7SBill Paul.\" SUCH DAMAGE.
272d91aab7SBill Paul.\"
282d91aab7SBill Paul.Dd April 9, 1995
292d91aab7SBill Paul.Dt YPBIND 8
302d91aab7SBill Paul.Os
312d91aab7SBill Paul.Sh NAME
322d91aab7SBill Paul.Nm ypbind
332d91aab7SBill Paul.Nd "NIS domain binding daemon"
342d91aab7SBill Paul.Sh SYNOPSIS
35ec93646dSJohn-Mark Gurney.Nm
362d91aab7SBill Paul.Op Fl ypset
372d91aab7SBill Paul.Op Fl ypsetme
382d91aab7SBill Paul.Op Fl s
39b2845e83SBill Paul.Op Fl m
40610a5778SRuslan Ermilov.Oo
41610a5778SRuslan Ermilov.Fl S
42610a5778SRuslan Ermilov.Sm off
43610a5778SRuslan Ermilov.Ar domainname , server1 , server2 , ...
44610a5778SRuslan Ermilov.Sm on
45610a5778SRuslan Ermilov.Oc
462d91aab7SBill Paul.Sh DESCRIPTION
47490d5836SPhilippe CharnierThe
48490d5836SPhilippe Charnier.Nm
49490d5836SPhilippe Charnierutility is the process that maintains NIS binding information.
50f2e366a1SSheldon HearnAt startup,
512d91aab7SBill Paulit searches for an NIS server responsible for serving the system's
522d91aab7SBill Pauldefault domain (as set by the
532d91aab7SBill Paul.Xr domainname 1
54456ebbf8SBill Paulcommand) using network broadcasts.
55456ebbf8SBill PaulOnce it receives a reply,
562d91aab7SBill Paulit will store the address of the server and other
572d91aab7SBill Paulinformation in a special file located in
582d91aab7SBill Paul.Pa /var/yp/binding .
592d91aab7SBill PaulThe NIS routines in the standard C library can then use this file
60f2e366a1SSheldon Hearnwhen processing NIS requests.
61f2e366a1SSheldon HearnThere may be several such files
622d91aab7SBill Paulsince it is possible for an NIS client to be bound to more than
632d91aab7SBill Paulone domain.
642d91aab7SBill Paul.Pp
652d91aab7SBill PaulAfter a binding has been established,
66ec93646dSJohn-Mark Gurney.Nm
672d91aab7SBill Paulwill send DOMAIN_NONACK requests to the NIS server at one minute
68f2e366a1SSheldon Hearnintervals.
69f2e366a1SSheldon HearnIf it fails to receive a reply to one of these requests,
70ec93646dSJohn-Mark Gurney.Nm
71456ebbf8SBill Paulassumes that the server is no longer running and resumes its network
722d91aab7SBill Paulbroadcasts until another binding is established.
73490d5836SPhilippe CharnierThe
74490d5836SPhilippe Charnier.Nm
75490d5836SPhilippe Charnierutility will also log warning messages using the
76ec93646dSJohn-Mark Gurney.Xr syslog 3
77ec93646dSJohn-Mark Gurneyfacility each time it detects that a server has stopped responding,
78ec93646dSJohn-Mark Gurneyas well as when it has bound to a new server.
790518c2b9SPhilippe Charnier.Pp
800518c2b9SPhilippe CharnierThe following options are available:
8177cbf0b3SPhilippe Charnier.Bl -tag -width indent
822d91aab7SBill Paul.It Fl ypset
832d91aab7SBill PaulIt is possible to force
84ec93646dSJohn-Mark Gurney.Nm
852d91aab7SBill Paulto bind to a particular NIS server host for a given domain by using the
862d91aab7SBill Paul.Xr ypset 8
87f2e366a1SSheldon Hearncommand.
88f2e366a1SSheldon HearnHowever,
89ec93646dSJohn-Mark Gurney.Nm
902d91aab7SBill Paulrefuses YPBINDPROC_SETDOM requests by default since it has no way of
91f2e366a1SSheldon Hearnknowing exactly who is sending them.
92f2e366a1SSheldon HearnUsing the
932d91aab7SBill Paul.Fl ypset
942d91aab7SBill Paulflag causes
95ec93646dSJohn-Mark Gurney.Nm
96f2e366a1SSheldon Hearnto accept YPBINDPROC_SETDOM requests from any host.
97f2e366a1SSheldon HearnThis option should only
982d91aab7SBill Paulbe used for diagnostic purposes and only for limited periods since allowing
99456ebbf8SBill Paularbitrary users to reset the binding of an NIS client poses a severe
1002d91aab7SBill Paulsecurity risk.
1012d91aab7SBill Paul.It Fl ypsetme
1022d91aab7SBill PaulThis is similar to the
1032d91aab7SBill Paul.Fl ypset
1042d91aab7SBill Paulflag, except that it only permits YPBINDPROC_SETDOM requests to be processed
1052d91aab7SBill Paulif they originated from the local host.
1062d91aab7SBill Paul.It Fl s
10777cbf0b3SPhilippe CharnierCause
108ec93646dSJohn-Mark Gurney.Nm
1092d91aab7SBill Paulto run in secure mode: it will refuse to bind to any NIS server
11007bfccd7SRuslan Ermilovthat is not running as root (i.e., that is not using privileged
1112d91aab7SBill PaulTCP ports).
112610a5778SRuslan Ermilov.It Fl S Xo
113610a5778SRuslan Ermilov.Sm off
114610a5778SRuslan Ermilov.Ar domainname , server1 , server2 , server3 , ...
115610a5778SRuslan Ermilov.Sm on
116610a5778SRuslan Ermilov.Xc
11777cbf0b3SPhilippe CharnierAllow the system administrator to lock
11877cbf0b3SPhilippe Charnier.Nm
11977cbf0b3SPhilippe Charnierto a particular
120f2e366a1SSheldon Hearndomain and group of NIS servers.
121f2e366a1SSheldon HearnUp to ten servers can be specified.
122a974cefeSBill PaulThere must not be any spaces between the commas in the domain/server
123f2e366a1SSheldon Hearnspecification.
124e7f8dd75SRebecca CranThis option is used to ensure that the system binds
125a974cefeSBill Paulonly to one domain and only to one of the specified servers, which
126a974cefeSBill Paulis useful for systems that are both NIS servers and NIS
127a974cefeSBill Paulclients: it provides a way to restrict what machines the system can
128a974cefeSBill Paulbind to without the need for specifying the
129a974cefeSBill Paul.Fl ypset
130a974cefeSBill Paulor
131a974cefeSBill Paul.Fl ypsetme
132f2e366a1SSheldon Hearnoptions, which are often considered to be security holes.
133f2e366a1SSheldon HearnThe specified
134a974cefeSBill Paulservers must have valid entries in the local
135a974cefeSBill Paul.Pa /etc/hosts
13607bfccd7SRuslan Ermilovfile.
13707bfccd7SRuslan ErmilovIP addresses may be specified in place of hostnames.
138f2e366a1SSheldon HearnIf
139ec93646dSJohn-Mark Gurney.Nm
1400227791bSRuslan Ermilovcannot make sense out of the arguments, it will ignore
141a974cefeSBill Paulthe
142a974cefeSBill Paul.Fl S
143a974cefeSBill Paulflag and continue running normally.
144a974cefeSBill Paul.Pp
145a974cefeSBill PaulNote that
146ec93646dSJohn-Mark Gurney.Nm
147a974cefeSBill Paulwill consider the domainname specified with the
148a974cefeSBill Paul.Fl S
149a974cefeSBill Paulflag to be the system default domain.
150b2845e83SBill Paul.It Fl m
15177cbf0b3SPhilippe CharnierCause
15277cbf0b3SPhilippe Charnier.Nm
15377cbf0b3SPhilippe Charnierto use a 'many-cast' rather than a broadcast for choosing a server
154f2e366a1SSheldon Hearnfrom the restricted mode server list.
155f2e366a1SSheldon HearnIn many-cast mode,
15677cbf0b3SPhilippe Charnier.Nm
15777cbf0b3SPhilippe Charnierwill transmit directly to the YPPROC_DOMAIN_NONACK procedure of the
15877cbf0b3SPhilippe Charnierservers specified in the restricted list and bind to the server that
15977cbf0b3SPhilippe Charnierresponds the fastest.
16077cbf0b3SPhilippe CharnierThis mode of operation is useful for NIS clients on remote subnets
161f2e366a1SSheldon Hearnwhere no local NIS servers are available.
162f2e366a1SSheldon HearnThe
163b2845e83SBill Paul.Fl m
164b2845e83SBill Paulflag can only be used in conjunction with the
165b2845e83SBill Paul.Fl S
166b2845e83SBill Paulflag above (if used without the
167b2845e83SBill Paul.Fl S
16877cbf0b3SPhilippe Charnierflag, it has no effect).
169b2845e83SBill Paul.El
170456ebbf8SBill Paul.Sh NOTES
171ec93646dSJohn-Mark GurneyThe
172ec93646dSJohn-Mark Gurney.Nm
173490d5836SPhilippe Charnierutility will not make continuous attempts to keep secondary domains bound.
174ec93646dSJohn-Mark GurneyIf a server for a secondary domain fails to respond to a ping,
175ec93646dSJohn-Mark Gurney.Nm
176f2e366a1SSheldon Hearnwill broadcast for a new server only once before giving up.
177f2e366a1SSheldon HearnIf a
178ec93646dSJohn-Mark Gurneyclient program attempts to reference the unbound domain,
179ec93646dSJohn-Mark Gurney.Nm
180f2e366a1SSheldon Hearnwill try broadcasting again.
181f2e366a1SSheldon HearnBy contrast,
182ec93646dSJohn-Mark Gurney.Nm
183456ebbf8SBill Paulwill automatically maintain a binding for the default domain whether
184*8bcffb86SGordon Berglingclient programs reference it or not.
1852d91aab7SBill Paul.Sh FILES
18677cbf0b3SPhilippe Charnier.Bl -tag -width /etc/rc.conf -compact
1872d91aab7SBill Paul.It Pa /var/yp/binding/[domainname].[version]
18877cbf0b3SPhilippe Charnierthe files used to hold binding information for each NIS domain
18977cbf0b3SPhilippe Charnier.It Pa /etc/rc.conf
19077cbf0b3SPhilippe Charniersystem configuration file where the system default domain and
19177cbf0b3SPhilippe Charnierypbind startup options are specified
1922d91aab7SBill Paul.El
1932d91aab7SBill Paul.Sh SEE ALSO
1942d91aab7SBill Paul.Xr domainname 1 ,
19578b0b234SMike Pritchard.Xr syslog 3 ,
196491a8429SRuslan Ermilov.Xr yp 8 ,
1972d91aab7SBill Paul.Xr ypserv 8 ,
19878b0b234SMike Pritchard.Xr ypset 8
199f12a1471SPhilippe Charnier.Sh AUTHORS
20001c2b8acSBaptiste Daroussin.An Theo de Raadt Aq Mt deraadt@fsa.ca
201