Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Check the status of an installed package.
To check the file attributes and contents, type the following:
# pkgchk -a| -c -v pkid ... |
To specify the absolute path of the spool directory, type the following:
# pkgchk -d spooldir pkgid ... |
Specifies to audit only the file attributes (the permissions), rather than the file attributes and the contents, which is the default.
Specifies to audit only the file contents, rather than the file contents and attributes, which is the default.
Specifies verbose mode, which displays file names as they are processed.
Specifies the absolute path of the spool directory.
(Optional) Is the name of one or more packages, separated by spaces. If you do not specify a pkgid, all the software packages installed on the system are checked.
The following example shows how to check the contents of a package.
# pkgchk -c SUNWbash |
If no errors occur, the system prompt is returned. Otherwise, the pkgck command reports the error.
The following example shows how to check the file attributes of a package.
# pkgchk -a SUNWbash |
If no errors occur, the system prompt is returned. Otherwise, the pkgck command reports the error.
The following example shows how to check a software package that was copied to a spool directory (/export/install/packages).
# pkgchk -d /export/install/packages ## checking spooled package <SUNWadmap> ## checking spooled package <SUNWadmfw> ## checking spooled package <SUNWadmc> ## checking spooled package <SUNWsadml> |
The checks made on a spooled package are limited because not all information can be audited until a package is installed.