]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/yp_mkdb/yp_mkdb.8
This commit was generated by cvs2svn to compensate for changes in r98530,
[FreeBSD/FreeBSD.git] / usr.sbin / yp_mkdb / yp_mkdb.8
1 .\" Copyright (c) 1995, 1996
2 .\"     Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by Bill Paul
15 .\" 4. Neither the name of the University nor the names of its contributors
16 .\"    may be used to endorse or promote products derived from this software
17 .\"    without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .\" $FreeBSD$
32 .\"
33 .Dd March 12, 1996
34 .Dt YP_MKDB 8
35 .Os
36 .Sh NAME
37 .Nm yp_mkdb
38 .Nd "generate the NIS databases"
39 .Sh SYNOPSIS
40 .Nm
41 .Fl c
42 .Nm
43 .Fl u Ar dbname
44 .Nm
45 .Op Fl c
46 .Op Fl b
47 .Op Fl s
48 .Op Fl f
49 .Op Fl i Ar inputfile
50 .Op Fl o Ar outputfile
51 .Op Fl d Ar domainname
52 .Op Fl m Ar mastername
53 .Ar inputfile
54 .Ar dbname
55 .Sh DESCRIPTION
56 .Nm Yp_mkdb
57 creates
58 .Xr db 3
59 style databases for use with
60 .Fx Ns 's
61 NIS server.
62 .Nm Yp_mkdb
63 reads data from
64 .Ar inputfile ,
65 and writes it to
66 .Ar dbname
67 in
68 .Xr db 3
69 format (using the hash table method).
70 The input should be in 'key data' format, which is to say
71 two fields of
72 .Tn ASCII
73 data separated by white space.
74 The first field
75 is assumed to be the key, and everything else is assumed to be
76 the data.
77 These databases are typically stored in
78 .Pa /var/yp/[domainname]
79 where
80 .Ar domainname
81 is the name of the NIS domain being served.
82 .Nm Yp_mkdb
83 is usually invoked by
84 .Pa /var/yp/Makefile .
85 .Nm Yp_mkdb
86 can also be used to dump an NIS database file so that its
87 contents can be examined.
88 For security reasons, all databases that
89 .Nm
90 creates are readable and writable by owner only (and usually the
91 owner is root).
92 .Pp
93 The following options are available:
94 .Bl -tag -width indent
95 .It Fl c
96 Cause
97 .Nm
98 to send a YPPROC_CLEAR request to
99 .Xr ypserv 8
100 on the local host.
101 This signal tells the server to close any open
102 database descriptors and flush out its database cache.
103 If used alone,
104 this flag signals the server and does nothing else.
105 If used as part
106 of a database creation command,
107 .Nm
108 will send the signal only after the new database has been successfully
109 created.
110 .It Fl b
111 Cause
112 .Nm
113 to add a special entry to the database with a key of
114 .Em YP_INTERDOMAIN
115 and an empty data field.
116 If this key is present in a map, it alters the
117 behavior of the 'match' procedure in
118 .Xr ypserv 8
119 slightly.
120 If a match query fails (because the server couldn't find
121 a record that matched the supplied key), and the
122 .Em YP_INTERDOMAIN
123 key exists within the queried map,
124 .Xr ypserv 8
125 will try to match the entry again using a DNS lookup.
126 Note that this
127 special behavior only applies to the
128 .Em hosts
129 maps.
130 Using the
131 .Fl b
132 flag for other maps has no effect.
133 .It Fl s
134 This flag is used to add a special entry to the database with a key of
135 .Em YP_SECURE
136 and an empty data field.
137 If this key is present in a map,
138 .Xr ypserv 8
139 will deny access to the map to any client that is not using a
140 reserved port for its query.
141 This is used mainly for the
142 .Em master.passwd
143 maps, which should be restricted to privileged access only.
144 .It Fl f
145 This flag is used to turn on filtering of lines in the source file
146 input that start with ``+'' or ``-'' characters.
147 These characters
148 have special meaning for the
149 .Pa group ,
150 .Pa passwd
151 and
152 .Pa master.passwd
153 maps and hence should not be allowed to appear in them as the first
154 character of a key or datum.
155 If the
156 .Fl f
157 flag is used,
158 .Nm
159 will reject any source line that starts with a ``+'' or ``-''
160 character and issue a warning message displaying the line that
161 was dropped.
162 .It Fl u Ar dbname
163 Dump (or 'unwind') an NIS database.
164 This option can be used to
165 inspect the contents of an existing NIS database.
166 .It Fl i Ar inputfile
167 When generating an NIS map, encode
168 .Ar inputfile
169 as a special entry in the database with a key of
170 .Em YP_INPUT_FILE .
171 .It Fl o Ar outputfile
172 When generating an NIS map, encode
173 .Ar outputfile
174 as a special entry in the database with a key of
175 .Em YP_OUTPUT_FILE .
176 .It Fl d Ar domainname
177 When generating an NIS map, encode
178 .Ar domainname
179 as a special entry in the database with a key of
180 .Em YP_DOMAIN_NAME .
181 .It Fl m Ar mastername
182 When generating an NIS map, encode
183 .Ar mastername
184 as a special entry in the database with a key of
185 .Em YP_MASTER_NAME .
186 This entry in the database is frequently used by various NIS utilities
187 to determine the name of an NIS master server for a domain.
188 By default,
189 .Nm
190 assumes that the local host is the NIS master; the
191 .Fl m
192 option is used to override this default.
193 .El
194 .Sh FILES
195 .Bl -tag -width /var/yp/Makefile -compact
196 .It Pa /var/yp/Makefile
197 the Makefile that calls
198 .Nm
199 to build the NIS databases
200 .El
201 .Sh SEE ALSO
202 .Xr db 3 ,
203 .Xr ypserv 8
204 .Sh AUTHORS
205 .An Bill Paul Aq wpaul@ctr.columbia.edu