1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
.\" $NetBSD: ypserv.8,v 1.22 2011/04/25 22:53:09 wiz 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.
.\"
.\" 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
.Dv LOG_DAEMON .
Error messages have the priority
.Dv LOG_ERR .
Refused requests are logged with the priority
.Dv LOG_WARNING .
All other messages are logged with the priority
.Dv 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 .
|