Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Wednesday, July 27, 2022



tnchkdb - check file syntax of trusted network databases


/usr/sbin/tnchkdb  [-h path] [-t path] [-z path]


tnchkdb checks the syntax of the tnrhtp, tnrhdb, and tnzonecfg databases. By default, the path for each file is:

  • /etc/security/tsol/tnrhtp

  • /etc/security/tsol/tnrhdb

  • /etc/security/tsol/tnzonecfg

You can specify an alternate path for any or all of the files by specifying that path on the command line by using the –h (tnrhdb), –t (tnrhtp), and –z (tnzonecfg) options. The options are useful when testing a set of modified files before installing the files as new system databases.

All three database files are checked for integrity. tnchkdb returns an exit status of 0 if all of the files are syntactically and, to the extent possible, semantically correct. If one or more files have errors, then an exit status of 1 is returned. If there are command line problems, such as an unreadable file, an exit status of 2 is returned. Errors are written to standard error.

To avoid cascading errors, when there are errors in tnrhtp, the template names in tnrhdb are not validated.

tnchkdb can be run at any label, but the standard /etc/security/tsol files are visible only in the global zone.


–h path

Check path for proper tnrhdb syntax. If –h is not specified, then check /etc/security/tsol/tnrhdb.

–t path

Check path for proper tnrhtp syntax. If –t is not specified, then check /etc/security/tsol/tnrhtp.

–z path

Check path for proper tnzonecfg syntax. If –z is not specified, then check /etc/security/tsol/tnzonecfg.


Example 1 Sample Error Message

The tnchkdb command checks for CIPSO errors. In this example, the admin_low template has an incorrect value of ADMIN_HIGH for its default label.

# tnchkdb
checking /etc/security/tsol/tnrhtp ...
tnchkdb: def_label classification 7fff is invalid for cipso labels:
line 14 entry admin_low
tnchkdb: def_label compartments 241-256 must be zero for cipso labels:
line 14 entry admin_low
checking /etc/security/tsol/tnrhdb ...
checking /etc/security/tsol/tnzonecfg ...



Trusted network remote-host database


Trusted network remote-host templates


Trusted zone configuration database


See attributes(7) for descriptions of the following attributes:

Interface Stability
See below.

The command line is Committed. The output is Uncommitted.

See Also

attributes(7), tnctl(8), tnd(8)

Trusted Extensions Configuration and Administration


The functionality described on this manual page is available only if the system is configured with Trusted Extensions.

It is possible to have inconsistent but valid configurations of tnrhtp and tnrhdb when LDAP is used to supply missing templates.


The tnchkdb command was added to Solaris in Solaris 10 4/08 (Update 5). Prior to that it was included in the Trusted Extensions add-on for Solaris.