1nisinit(1M) System Administration Commands nisinit(1M)
2
3
4
6 nisinit - NIS+ client and server initialization utility
7
9 nisinit -r
10
11
12 nisinit -p Y | D | N parent_domain host...
13
14
15 nisinit -c [-k <key_domain>] -H host | -B | -C coldstart
16
17
19 nisinit initializes a machine to be a NIS+ client or an NIS+ root mas‐
20 ter server. It may be easier to use nisclient(1M) or nisserver(1M) to
21 accomplish this same task.
22
24 -r
25
26 Initialize the machine to be a NIS+ root server. This option cre‐
27 ates the file /var/nis/data/root.object and initialize it to con‐
28 tain information about this machine. It uses the sysinfo(2) system
29 call to retrieve the name of the default domain.
30
31 To initialize the machine as an NIS+ root server, it is advisable
32 to use the "-r" option of nisserver(1M), instead of using "nisinit
33 -r".
34
35
36 -p Y | D | N parent_domain host ...
37
38 This option is used on a root server to initialize a
39 /var/nis/data/parent.object to make this domain a part of the
40 namespace above it. Only root servers can have parent objects. A
41 parent object describes the namespace ``above'' the NIS+ root. If
42 this is an isolated domain, this option should not be used. The
43 argument to this option tells the command what type of name server
44 is serving the domain above the NIS+ domain. When clients attempt
45 to resolve a name that is outside of the NIS+ namespace, this
46 object is returned with the error NIS_FOREIGNNS indicating that a
47 name space boundary has been reached. It is up to the client to
48 continue the name resolution process.
49
50 The parameter parent_domain is the name of the parent domain in a
51 syntax that is native to that type of domain. The list of host
52 names that follow the domain parameter are the names of hosts that
53 serve the parent domain. If there is more than one server for a
54 parent domain, the first host specified should be the master server
55 for that domain.
56
57 Y Specifies that the parent directory is a NIS version 2 domain.
58
59
60 D Specifies that the parent directory is a DNS domain.
61
62
63 N Specifies that the parent directory is another NIS+ domain.
64 This option is useful for connecting a pre-existing NIS+ sub‐
65 tree into the global namespace.
66
67 Note that in the current implementation, the NIS+ clients do not
68 take advantage of the -p feature. Also, since the parent object is
69 currently not replicated on root replica servers, it is recommended
70 that this option not be used.
71
72
73 -c
74
75 Initializes the machine to be a NIS+ client. There are three ini‐
76 tialization options available: initialize by coldstart, initialize
77 by hostname, and initialize by broadcast. The most secure mechanism
78 is to initialize from a trusted coldstart file. The second option
79 is to initialize using a hostname that you specify as a trusted
80 host. The third method is to initialize by broadcast and it is the
81 least secure method.
82
83 -C coldstart Causes the file coldstart to be used as a prototype
84 coldstart file when initializing a NIS+ client.
85 This coldstart file can be copied from a machine
86 that is already a client of the NIS+ namespace. For
87 maximum security, an administrator can encrypt and
88 encode (with uuencode(1C)) the coldstart file and
89 mail it to an administrator bringing up a new
90 machine. The new administrator would then decode
91 (with uudecode), decrypt, and then use this file
92 with the nisinit command to initialize the machine
93 as an NIS+ client. If the coldstart file is from
94 another client in the same domain, the nisinit com‐
95 mand may be safely skipped and the file copied into
96 the /var/nis directory as /var/nis/NIS_COLD_START.
97
98
99 -H hostname Specifies that the host hostname should be con‐
100 tacted as a trusted NIS+ server. The nisinit com‐
101 mand will iterate over each transport in the NET‐
102 PATH environment variable and attempt to contact
103 rpcbind(1M) on that machine. This hostname must be
104 reachable from the client without the name service
105 running. For IP networks this means that there must
106 be an entry in /etc/hosts for this host when
107 nisinit is invoked.
108
109
110 -B Specifies that the nisinit command should use an IP
111 broadcast to locate a NIS+ server on the local sub‐
112 net. Any machine that is running the NIS+ service
113 may answer. No guarantees are made that the server
114 that answers is a server of the organization's
115 namespace. If this option is used, it is advisable
116 to check with your system administrator that the
117 server and domain served are valid. The binding
118 information can be dumped to the standard output
119 using the nisshowcache(1M) command.
120
121 Note that nisinit -c will just enable navigation of the NIS+ name
122 space from this client. To make NIS+ your name service, modify the
123 file /etc/nsswitch.conf to reflect that. See nsswitch.conf(4) for
124 more details.
125
126
127 -k <key_domain>
128
129 This option specifies the domain where root's credentials are
130 stored. If it is not specified, then the system default domain is
131 assumed. This domain name is used to create the
132 /var/nis/NIS_COLD_START file.
133
134
136 nisinit returns 0 on success and 1 on failure.
137
139 Example 1 Initializing the Machine as an NIS+ Client using the Host
140 freddy as a Trusted Server
141
142
143 This example initializes the machine as an NIS+ client using the host
144 freddy as a trusted server.
145
146
147 example# nisinit -cH freddy
148
149
150
151 Example 2 Setting up a Client using a Trusted Coldstart File
152
153
154 This example sets up a client using a trusted coldstart file.
155
156
157 example# nisinit -cC /tmp/colddata
158
159
160
161 Example 3 Setting up a Client Using an IP Broadcast
162
163
164 This example sets up a client using an IP broadcast.
165
166
167 example# nisinit -cB
168
169
170
171 Example 4 Setting up a Root Server
172
173
174 This example sets up a root server.
175
176
177 example# nisinit -r
178
179
180
182 NETPATH This environment variable may be set to the transports to
183 try when contacting the NIS+ server (see netconfig(4)). The
184 client library will only attempt to contact the server using
185 connection oriented transports.
186
187
189 /var/nis/NIS_COLD_START
190
191 This file contains a list of servers, their transport addresses,
192 and their Secure RPC public keys that serve the machine's default
193 domain.
194
195
196 /var/nis/data/root.object
197
198 This file describes the root object of the NIS+ namespace. It is a
199 standard XDR-encoded NIS+ directory object that can be modified by
200 authorized clients using the nis_modify() interface.
201
202
203 /var/nis/data/parent.object
204
205 This file describes the namespace that is logically above the NIS+
206 namespace. The most common type of parent object is a DNS object.
207 This object contains contact information for a server of that
208 domain.
209
210
211 /etc/hosts
212
213 Internet host table.
214
215
217 See attributes(5) for descriptions of the following attributes:
218
219
220
221
222 ┌─────────────────────────────┬─────────────────────────────┐
223 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
224 ├─────────────────────────────┼─────────────────────────────┤
225 │Availability │SUNWnisu │
226 └─────────────────────────────┴─────────────────────────────┘
227
229 NIS+[22m(1), uuencode(1C), nisclient(1M), nisserver(1M), nisshowcache(1M),
230 sysinfo (2), hosts(4), netconfig(4), nisfiles(4), attributes(5)
231
233 NIS+ might not be supported in future releases of the Solaris operating
234 system. Tools to aid the migration from NIS+ to LDAP are available in
235 the current Solaris release. For more information, visit
236 http://www.sun.com/directory/nisplus/transition.html.
237
238
239
240SunOS 5.11 12 Dec 2001 nisinit(1M)