Merge branch 'less_closed'
[unleashed.git] / usr / src / man / man1m / smtnrhdb.1m
blob74734855e324e656c94e36702f3f05a17437cfee
1 '\" te
2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SMTNRHDB 1M "April 9, 2016"
7 .SH NAME
8 smtnrhdb \- manage entries in the tnrhdb database
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sadm/bin/smtnrhdb\fR \fIsubcommand\fR [\fIauth_args\fR] \fB--\fR \fIsubcommand_args\fR]
13 .fi
15 .SH DESCRIPTION
16 .LP
17 The \fBsmtnrhdb\fR command adds, modifies, deletes, and lists entries in the
18 \fBtnrhdb\fR database.
19 .sp
20 .LP
21 The \fBtnrhdb\fR database specifies which remote-host template to use for each
22 host, including the local host, in the distributed system. If a host's  IP
23 address cannot be matched to some entry in the \fBtnrhdb\fR database,
24 communication with the host is not permitted.
25 .sp
26 .LP
27 The \fBsmtnrhdb\fR command requires the Solaris Management Console to be
28 initialized for the command to succeed (see \fBsmc\fR(1M)). After rebooting the
29 Solaris Management Console server, the first \fBsmc\fR connection can time out,
30 so you might need to retry the command.
31 .SS "Valid Host Addresses and Wildcards"
32 .LP
33 The trusted network software uses a network "longest prefix of matching bits"
34 mechanism when looking for a host. The software looks first for the IP address
35 of the host. If the software does not find this address, then the software
36 falls back to searching for an IP address with the longest prefix of a matching
37 bit pattern, and so on.
38 .LP
39 Note -
40 .sp
41 .RS 2
42 The actual numeric value of the subnet  address or other subnetting
43 information on the system (for example, from the \fBnetmasks\fR(4)  file)  are
44 not considered by this mechanism.
45 .RE
46 .sp
47 .LP
48 Using the "longest prefix of matching bits" mechanism, an IPv4 address of
49 0.0.0.0 is a wildcard address with a prefix length of 0 and hence matches any
50 IPv4 address. For more information about prefi x lengths in IPv4 and IPv6
51 addresses, see \fISystem Administration Guide: IP Services\fR.
52 .sp
53 .LP
54 The \fBsmtnrhdb\fR command accepts a hostname, IP address, and wildcard address
55 with as optional prefix as valid addresses. See \fIsubcommand_args\fR, below,
56 for the format of valid addresses.
57 .SH SUBCOMMANDS
58 .LP
59 \fBsmtnrhdb\fR \fIsubcommand\fRs are:
60 .sp
61 .ne 2
62 .na
63 \fB\fBadd\fR\fR
64 .ad
65 .sp .6
66 .RS 4n
67 Adds a new entry to the \fBtnrhdb\fR database. To add an entry, the
68 administrator must have the \fBsolaris.network.host.write\fR and
69 \fBsolaris.network.security.write\fR authorizations.
70 .RE
72 .sp
73 .ne 2
74 .na
75 \fB\fBdelete\fR\fR
76 .ad
77 .sp .6
78 .RS 4n
79 Deletes an entry from the \fBtnrhdb\fR database. To delete an entry, the
80 administrator must have the \fBsolaris.network.host.write\fR and
81 \fBsolaris.network.security.write\fR authorizations.
82 .RE
84 .sp
85 .ne 2
86 .na
87 \fB\fBlist\fR\fR
88 .ad
89 .sp .6
90 .RS 4n
91 Lists all entries in the \fBtnrhdb\fR database. To list an entry, the
92 administrator must have the \fBsolaris.network.host.read\fR and
93 \fBsolaris.network.security.read\fR authorizations.
94 .RE
96 .sp
97 .ne 2
98 .na
99 \fB\fBmodify\fR\fR
101 .sp .6
102 .RS 4n
103 Modifies an entry in the \fBtnrhdb\fR database. To modify an entry, the
104 administrator must have the \fBsolaris.network.host.write\fR and
105 \fBsolaris.network.security.write\fR authorizations.
108 .SH OPTIONS
110 The \fBsmtnrhdb\fR authentication arguments, \fIauth_args\fR, are derived from
111 the \fBsmc\fR arg set. These arguments are the same regardless of which
112 subcommand you use.
115 The subcommand-specific options, \fIsubcommand_args\fR, must be preceded by the
116 \fB--\fR option.
117 .SS "\fIauth_args\fR"
119 The valid \fIauth_args\fR are \fB-D\fR, \fB-H\fR, \fB-l\fR, \fB-p\fR, \fB-r\fR,
120 and \fB-u\fR; they are all optional. If no \fIauth_args\fR are specified,
121 certain defaults will be assumed and the user might be prompted for additional
122 information, such as a password for authentication purposes. These letter
123 options can also be specified by their equivalent option words preceded by a
124 double dash. For example, you can use either \fB-D\fR or \fB--domain\fR.
126 .ne 2
128 \fB\fB-D\fR | \fB--domain\fR \fIdomain\fR\fR
130 .sp .6
131 .RS 4n
132 Specifies the default domain that you want to manage. The syntax of
133 \fIdomain\fR=\fItype\fR:/\fIhost_name\fR/\fIdomain_name\fR, where \fItype\fR is
134 \fBdns\fR, \fBldap\fR, or \fBfile\fR; \fIhost_name\fR is the name of the
135 server; and \fIdomain_name\fR is the name of the domain you want to manage.
137 If you do not specify this option, the Solaris Management Console assumes the
138 \fBfile\fR default domain on whatever server you choose to manage, meaning that
139 changes are local to the server. Toolboxes can change the domain on a
140 tool-by-tool basis; this option specifies the domain for all other tools.
144 .ne 2
146 \fB\fB-H\fR | \fB--hostname\fR \fIhost_name:port\fR\fR
148 .sp .6
149 .RS 4n
150 Specifies the \fIhost_name\fR and \fIport\fR to which you want to connect. If
151 you do not specify a \fIport\fR, the system connects to the default port,
152 \fB898\fR. If you do not specify \fIhost_name:port\fR, the Solaris Management
153 Console connects to the local host on port \fB898\fR.
157 .ne 2
159 \fB\fB-l\fR | \fB--rolepassword\fR \fIrole_password\fR\fR
161 .sp .6
162 .RS 4n
163 Specifies the password for the \fIrole_name\fR. If you specify a
164 \fIrole_name\fR but do not specify a \fIrole_password\fR, the system prompts
165 you to supply a \fIrole_password\fR. Passwords specified on the command line
166 can be seen by any user on the system, hence this option is considered
167 insecure.
171 .ne 2
173 \fB\fB-p\fR | \fB--password\fR \fIpassword\fR\fR
175 .sp .6
176 .RS 4n
177 Specifies the password for the \fIuser_name\fR. If you do not specify a
178 password, the system prompts you for one. Passwords specified on the command
179 line can be seen by any user on the system, hence this option is considered
180 insecure.
184 .ne 2
186 \fB\fB-r\fR | \fB--rolename\fR \fIrole_name\fR\fR
188 .sp .6
189 .RS 4n
190 Specifies a role name for authentication. If you do not specify this option, no
191 role is assumed.
195 .ne 2
197 \fB\fB-u\fR | \fB--username\fR \fIuser_name\fR\fR
199 .sp .6
200 .RS 4n
201 Specifies the user name for authentication. If you do not specify this option,
202 the user identity running the console process is assumed.
206 .ne 2
208 \fB\fB--\fR\fR
210 .sp .6
211 .RS 4n
212 This option is required and must always follow the preceding options. If you do
213 not enter the preceding options, you must still enter the \fB--\fR option.
216 .SS "\fIsubcommand_args\fR"
218 \fBNote:\fR Descriptions and other arg options that contain white spaces must
219 be enclosed in double quotes.
221 .ne 2
223 \fB\fB-h\fR\fR
225 .sp .6
226 .RS 4n
227 Displays the command's usage statement.
231 .ne 2
233 \fB\fB-H\fR \fIhostname\fR\fR
235 .sp .6
236 .RS 4n
237 Specifies the name of the host. For the list subcommand, the hostname argument
238 is not specified. This is not required if the ipaddress subcommand argument is
239 specified.
243 .ne 2
245 \fB\fB-i\fR \fIipaddress\fR\fR
247 .sp .6
248 .RS 4n
249 Specifies the \fBIP\fR address of the host. This is not required if the
250 hostname subcommand argument is specified. This option is not valid with the
251 \fB-w\fR option.
255 .ne 2
257 \fB\fB-n\fR \fItemplatename\fR\fR
259 .sp .6
260 .RS 4n
261 Specifies the name of an existing template.
265 .ne 2
267 \fB\fB-p\fR \fIprefixlen\fR\fR
269 .sp .6
270 .RS 4n
271 Specifies the prefix length (in bits) of a wildcard representation of the IP
272 address. The prefix is the left-most portion of the IP address. This option is
273 valid only with the \fB-w\fR option. For example, when the value of \fB-w\fR
274 \fIipaddress-wildcard\fR is 192.168.0.0, a \fIprefixlen\fR value of 24
275 indicates that the wildcard matches all addresses on the 192.168.0 network.
276 With a \fIprefixlen\fR of 32, the wildcard 192.168.0.0 matches all addresses on
277 the 192.168.0.0 network.
281 .ne 2
283 \fB\fB-w\fR \fIipaddress-wildcard\fR\fR
285 .sp .6
286 .RS 4n
287 Specifies the IP address of the subnet using a wildcard.
290 .RS +4
292 .ie t \(bu
293 .el o
294 One of the following sets of arguments must be specified for subcommand
295 \fBadd\fR:
297 .in +2
299 \fB-H\fR \fIhostname\fR \fB-n\fR \fItemplatename\fR |
300 \fB-i\fR \fIipaddress\fR \fB-n\fR \fItemplatename\fR |
301 \fB-w\fR \fIipaddress-wildcard\fR \fB-n\fR \fItemplatename\fR [ \fB-p\fR \fIprefixlen\fR ] |
302 \fB-h\fR
304 .in -2
308 .RS +4
310 .ie t \(bu
311 .el o
312 One of the following sets of arguments must be specified for subcommand
313 \fBmodify\fR:
315 .in +2
317 \fB-H\fR \fIhostname\fR \fB-n\fR \fItemplatename\fR |
318 \fB-i\fR \fIipaddress\fR \fB-n\fR \fItemplatename\fR |
319 \fB-w\fR \fIipaddress-wildcard\fR \fB-n\fR \fItemplatename\fR [ \fB-p\fR \fIprefixlen\fR ] |
320 \fB-h\fR
322 .in -2
326 .RS +4
328 .ie t \(bu
329 .el o
330 One of the following sets of arguments must be specified for subcommand
331 \fBdelete\fR:
333 .in +2
335 \fB-H\fR \fIhostname\fR |
336 \fB-i\fR \fIipaddress\fR |
337 \fB-w\fR \fIipaddress-wildcard\fR [ \fB-p\fR \fIprefixlen\fR ] |
338 \fB-h\fR
340 .in -2
344 .RS +4
346 .ie t \(bu
347 .el o
348 The subcommand \fBlist\fR takes the following argument:
350 .in +2
352 \fB-h\fR
354 .in -2
358 .SH EXAMPLES
360 \fBExample 1 \fRSpecifying the Template Name for a Wildcard IP Address
363 The admin role specifies the template name, \fBcipso_lan\fR, for a series of
364 hosts that use the IP address wildcard \fB192.168.113.0\fR on the local file
365 system. Since no authorization arguments were specified, the administrator
366 connects to port 898 of the local host on the local server with the file domain
367 type, which are the defaults. The administrator is prompted for the admin
368 password.
371 .in +2
373 $ \fBusr/sadm/bin/smtnrhdb add -- -w 192.168.113.0 -n cipso_lan\fR
375 .in -2
379 \fBExample 2 \fRDeleting an Entry in the \fBtnrhdb\fR Database
382 The admin role connects to port 898 (which happens to be the default) of the
383 LDAP server and deletes a host entry from the database by specifying its IP
384 address, \fB192.168.113.8\fR. Since the domain was not specified, the file
385 domain type and local server are used by default. The administrator is prompted
386 for the admin password.
389 .in +2
391 # \fB/usr/sadm/bin/smtnrhdb delete \
392 -D ldap:/example.domain -i 192.168.113.8\fR
394 .in -2
398 \fBExample 3 \fRAdding a Subnet to the \fBtnrhdb\fR Database
401 The following command adds all the addresses on the 192.168.55.0 subnet, from
402 192.168.55.1 to 192.168.55.255, to the \fBtnrhdb\fR database:
405 .in +2
407 # \fB/usr/sadm/bin/smtnrhdb add \e
408 -D file:/machine1.ExampleCo.COM/machine1.ExampleCo.COM \e
409  -- -w 192.168.55.0 -n cipso\fR
410 Authenticating as user: \fBroot\fR
411 Type /? for help, pressing <enter> accepts the default denoted by [ ]
412 Please enter a string value for: password \fB::\fR
413 Loading Tool: com.exampleco.admin.hostmgr.cli.smtnrhdb.HostMgrTnrhdbCli
414 from machine1.ExampleCo.COM
415 Login to machine1.ExampleCo.COM as user root was successful.
416 Download of com.exampleco.admin.hostmgr.cli.smtnrhdb.HostMgrTnrhdbCli
417 from machine1.ExampleCo.COM
418 was successful.
420 .in -2
424 \fBExample 4 \fRAdding Subnet 192.168.0 to the \fBtnrhdb\fR Database
427 The following command adds all the addresses on the 192.168.0 subnet, from
428 192.168.0.1 to 192.168.0.255 to the \fBtnrhdb\fR database. The prefix, 24,
429 indicates that the first 24 bits (192.168.0) are fixed. Only the final zero is
430 a wildcard.
433 .in +2
435 # \fB/usr/sadm/bin/smtnrhdb add \e
436 -D file:/machine1.ExampleCo.COM/machine1.ExampleCo.COM \e
437  -- -w 192.168.0.0 -p 24 -n cipso\fR
439 Login to machine1.ExampleCo.COM as user root was successful.
440 Download of com.exampleco.admin.hostmgr.cli.smtnrhdb.HostMgrTnrhdbCli
441 from machine1.ExampleCo.COM was successful.
443 .in -2
446 .SH EXIT STATUS
448 The following exit values are returned:
450 .ne 2
452 \fB\fB0\fR\fR
454 .sp .6
455 .RS 4n
456 Successful completion.
460 .ne 2
462 \fB\fB1\fR\fR
464 .sp .6
465 .RS 4n
466 Invalid command syntax. A usage message displays.
470 .ne 2
472 \fB\fB2\fR\fR
474 .sp .6
475 .RS 4n
476 An error occurred while executing the command. An error message displays.
479 .SH FILES
481 The following files are used by the \fBsmtnrhdb\fR command:
483 .ne 2
485 \fB\fB/etc/security/tsol/tnrhdb\fR\fR
487 .sp .6
488 .RS 4n
489 Trusted network remote-host database.
492 .SH ATTRIBUTES
494 See \fBattributes\fR(5) for descriptions of the following attributes:
499 box;
500 c | c
501 l | l .
502 ATTRIBUTE TYPE  ATTRIBUTE VALUE
504 Interface Stability     Committed
507 .SH SEE ALSO
509 \fBsmc\fR(1M), \fBnetmasks\fR(4), \fBattributes\fR(5)
512 \fISystem Administration Guide: Security Services\fR
513 .SH NOTES
515 The functionality described on this manual page is available only if the system
516 is configured with Trusted Extensions.