NetBSD-5.0.2/usr.sbin/ypserv/ypserv/ypserv.8

Compare this file to the similar file:
Show the results in this format:

.\"	$NetBSD: ypserv.8,v 1.19 2008/05/16 16:41:42 chuck Exp $
.\"
.\" Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by Mats O Jansson
.\" 4. The name of the author may not be used to endorse or promote products
.\"    derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd May 20, 2006
.Dt YPSERV 8
.Os
.Sh NAME
.Nm ypserv
.Nd NIS server daemon
.Sh SYNOPSIS
.Nm
.Op Fl dfl
.Op Fl p Ar port
.Sh DESCRIPTION
.Nm
is a fundamental part of the network information system called
.Tn NIS .
This server provides information from
.Tn NIS
maps to the
.Tn NIS
clients on the network.
.Pp
A
.Tn NIS
map is stored on the server as a
.Xr db 3
database.
A number of
.Tn NIS
maps is grouped together in a domain.
.Nm
determines the domains it serves by looking for a directory with
the domain name in
.Ar /var/yp .
.Pp
In an effort to improve the security of
.Tn NIS
(which has, historically, not been very good), this
.Nm
has support for libwrap-based access control.
See
.Xr hosts_access 5
for more information.
The
.Em daemon
used for access control is the name which
.Nm
was invoked as (typically
.Dq ypserv
).  If a host is not allowed to query this
.Tn NIS
server,
.Nm
will return the
.Tn NIS
result code YP_NODOM.
To avoid problems with DNS lookups causing 
.Nm
to hang,
.Nm
disables DNS lookups for its client
.Xr hosts_access 5
lists.  The result is that
.Nm
can only use address based patterns.  This also means that wildcard patterns
such as LOCAL or KNOWN will not work.
.Pp
The process pid of the
.Nm
process can be found in the file
.Pa /var/run/ypserv.pid .
.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl d
Use internet Domain Name System. If a query to map
.Pa hosts.byname
or
.Pa hosts.byaddr
fails, make a DNS query and return the result if successful.
.It Fl f
Run in the foreground.
.It Fl l
Enable logging of all requests.
.It Fl p Ar port
Bind to the specified
.Ar port
instead of dynamically allocating one.
.El
.Pp
All messages are sent to the system log with the facility LOG_DAEMON.
Error messages have the priority LOG_ERR.  Refused requests are logged
with the priority LOG_WARNING.  All other messages are logged with the
priority LOG_INFO.
.Sh FILES
.Bl -tag -width /var/run/ypserv.pid -compact
.It Pa /var/run/ypserv.pid
.El
.Sh SEE ALSO
.Xr syslog 3 ,
.Xr hosts_access 5 ,
.Xr nis 8 ,
.Xr syslogd 8 ,
.Xr ypbind 8 ,
.Xr ypinit 8
.Sh AUTHORS
This implementation of
.Nm
was originally written by
.An Mats O Jansson
.Aq moj@stacken.kth.se .
The access control code was later re-written from scratch by
.An Jason R. Thorpe
.Aq thorpej@NetBSD.org .