| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 1M: System Administration Commands Oracle Solaris 11 Information Library |
- manage entries in the tnrhdb database
/usr/sadm/bin/smtnrhdbsubcommand [auth_args]--subcommand_args]
Thesmtnrhdb command adds, modifies, deletes, and lists entries in thetnrhdbdatabase.
Thetnrhdb database specifies which remote-host template to use for each host,including the local host, in the distributed system. If a host's IP address cannot be matched to some entry in thetnrhdbdatabase, communication with the host is not permitted.
The trusted network software uses a network “longest prefix of matching bits”mechanism when looking for a host. The software looks first for theIP address of the host. If the software does not find thisaddress, then the software falls back to searching for an IP addresswith the longest prefix of a matching bit pattern, and so on.
Note -The actual numeric value of the subnet address or other subnetting information on the system (for example, from thenetmasks(4) file) are not considered by this mechanism.
Using the “longest prefix of matching bits” mechanism, an IPv4 address of0.0.0.0 is a wildcard address with a prefix length of 0 andhence matches any IPv4 address. For more information about prefi x lengthsin IPv4 and IPv6 addresses, seeOracle Solaris Administration: IP Services.
Thesmtnrhdb command accepts a hostname, IP address, and wildcard address withas optional prefix as valid addresses. Seesubcommand_args, below, for the formatof valid addresses.
smtnrhdbsubcommands are:
Adds a new entry to thetnrhdb database. To add an entry, the administrator must have thesolaris.network.host.write andsolaris.network.security.write authorizations.
Deletes an entry from thetnrhdb database. To delete an entry, the administrator must have thesolaris.network.host.write andsolaris.network.security.write authorizations.
Lists all entries in thetnrhdb database. To list an entry, the administrator must have thesolaris.network.host.read andsolaris.network.security.read authorizations.
Modifies an entry in thetnrhdb database. To modify an entry, the administrator must have thesolaris.network.host.write andsolaris.network.security.write authorizations.
Thesmtnrhdb authentication arguments,auth_args, are derived from thesmc arg set.These arguments are the same regardless of which subcommand you use.
The subcommand-specific options,subcommand_args, must be preceded by the-- option.
The validauth_args are-D,-H,-l,-p,-r, and-u; theyare all optional. If noauth_args are specified, certain defaults will beassumed and the user might be prompted for additional information, such as apassword for authentication purposes. These letter options can also be specified bytheir equivalent option words preceded by a double dash. For example, youcan use either-D or--domain.
Specifies the default domain that you want to manage. The syntax ofdomain=type:/host_name/domain_name, wheretype isdns,ldap, orfile;host_name is the name of the server; anddomain_name is the name of the domain you want to manage.
If you do not specify this option, the system assumes thefile default domain on whatever server you choose to manage, meaning that changes are local to the server. Toolboxes can change the domain on a tool-by-tool basis; this option specifies the domain for all other tools.
Specifies thehost_name andport to which you want to connect. If you do not specify aport, the system connects to the default port,898. If you do not specifyhost_name:port, the system connects to the local host on port898.
Specifies the password for therole_name. If you specify arole_name but do not specify arole_password, the system prompts you to supply arole_password. Passwords specified on the command line can be seen by any user on the system, hence this option is considered insecure.
Specifies the password for theuser_name. If you do not specify a password, the system prompts you for one. Passwords specified on the command line can be seen by any user on the system, hence this option is considered insecure.
Specifies a role name for authentication. If you do not specify this option, no role is assumed.
Specifies the user name for authentication. If you do not specify this option, the user identity running the console process is assumed.
This option is required and must always follow the preceding options. If you do not enter the preceding options, you must still enter the-- option.
Note: Descriptions and other arg options that contain white spaces must beenclosed in double quotes.
Displays the command's usage statement.
Specifies the name of the host. For the list subcommand, the hostname argument is not specified. This is not required if the ipaddress subcommand argument is specified.
Specifies the IP address of the host. This is not required if the hostname subcommand argument is specified. This option is not valid with the-w option.
Specifies the name of an existing template.
Specifies the prefix length (in bits) of a wildcard representation of the IP address. The prefix is the left-most portion of the IP address. This option is valid only with the-w option. For example, when the value of-wipaddress-wildcard is 192.168.0.0, aprefixlen value of 24 indicates that the wildcard matches all addresses on the 192.168.0 network. With aprefixlen of 32, the wildcard 192.168.0.0 matches all addresses on the 192.168.0.0 network.
Specifies the IP address of the subnet using a wildcard.
One of the following sets of arguments must be specified for subcommandadd:
-Hhostname-ntemplatename |-iipaddress-ntemplatename |-wipaddress-wildcard-ntemplatename [-pprefixlen ] |-h
One of the following sets of arguments must be specified for subcommandmodify:
-Hhostname-ntemplatename |-iipaddress-ntemplatename |-wipaddress-wildcard-ntemplatename [-pprefixlen ] |-h
One of the following sets of arguments must be specified for subcommanddelete:
-Hhostname |-iipaddress |-wipaddress-wildcard [-pprefixlen ] |-h
The subcommandlist takes the following argument:
-h
Example 1 Specifying the Template Name for a Wildcard IP Address
The admin role specifies the template name,cipso_lan, for a series ofhosts that use the IP address wildcard192.168.113.0 on the local filesystem. Since no authorization arguments were specified, the administrator connects to port898 of the local host on the local server with the file domaintype, which are the defaults. The administrator is prompted for the adminpassword.
$usr/sadm/bin/smtnrhdb add -- -w 192.168.113.0 -n cipso_lan
Example 2 Deleting an Entry in thetnrhdb Database
The admin role connects to port 898 (which happens to be thedefault) of the LDAP server and deletes a host entry from thedatabase by specifying its IP address,192.168.113.8. Since the domain was notspecified, the file domain type and local server are used by default. Theadministrator is prompted for the admin password.
#/usr/sadm/bin/smtnrhdb delete \ -D ldap:/example.domain -i 192.168.113.8
Example 3 Adding a Subnet to thetnrhdb Database
The following command adds all the addresses on the 192.168.55.0 subnet, from192.168.55.1 to 192.168.55.255, to thetnrhdb database:
#/usr/sadm/bin/smtnrhdb add \ -D file:/machine1.ExampleCo.COM/machine1.ExampleCo.COM \ -- -w 192.168.55.0 -n cipsoAuthenticating as user:rootType /? for help, pressing <enter> accepts the default denoted by [ ]Please enter a string value for: password::Loading Tool: com.exampleco.admin.hostmgr.cli.smtnrhdb.HostMgrTnrhdbClifrom machine1.ExampleCo.COMLogin to machine1.ExampleCo.COM as user root was successful.Download of com.exampleco.admin.hostmgr.cli.smtnrhdb.HostMgrTnrhdbClifrom machine1.ExampleCo.COMwas successful.
Example 4 Adding Subnet 192.168.0 to thetnrhdb Database
The following command adds all the addresses on the 192.168.0 subnet, from192.168.0.1 to 192.168.0.255 to thetnrhdb database. The prefix, 24, indicates thatthe first 24 bits (192.168.0) are fixed. Only the final zero isa wildcard.
#/usr/sadm/bin/smtnrhdb add \ -D file:/machine1.ExampleCo.COM/machine1.ExampleCo.COM \ -- -w 192.168.0.0 -p 24 -n cipsoLogin to machine1.ExampleCo.COM as user root was successful.Download of com.exampleco.admin.hostmgr.cli.smtnrhdb.HostMgrTnrhdbCli from machine1.ExampleCo.COM was successful.
The following exit values are returned:
Successful completion.
Invalid command syntax. A usage message displays.
An error occurred while executing the command. An error message displays.
The following files are used by thesmtnrhdb command:
Trusted network remote-host database.
Seeattributes(5) for descriptions of the following attributes:
|
Oracle Solaris Administration: Security Services
The functionality described on this manual page is available only if thesystem is configured with Trusted Extensions.
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |