2 .\" Copyright (c) 2003, 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. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\" See the License for the specific language governing permissions and limitations under the License. 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
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PKGADM 1M "Mar 20, 2009"
8 pkgadm \- manage packaging and patching system
12 \fBpkgadm addcert\fR [\fB-ty\fR] [\fB-a\fR \fIapp\fR] [\fB-k\fR \fIkeystore\fR] [\fB-e\fR \fIkeyfile\fR]
13 [\fB-f\fR \fIformat\fR] [\fB-n\fR \fIname\fR] [\fB-P\fR \fIpassarg\fR]
14 [\fB-p\fR \fIimport_passarg\fR] [\fB-R\fR \fIrootpath\fR] certfile
19 \fBpkgadm removecert\fR [\fB-a\fR \fIapp\fR] [\fB-k\fR \fIkeystore\fR] \fB-n\fR \fIname\fR
20 [\fB-P\fR \fIpassarg\fR] [\fB-R\fR \fIrootpath\fR]
25 \fBpkgadm listcert\fR [\fB-a\fR \fIapp\fR] [\fB-f\fR \fIformat\fR] [\fB-k\fR \fIkeystore\fR] \fB-n\fR \fIname\fR
26 [\fB-P\fR \fIpassarg\fR] [\fB-o\fR \fIoutfile\fR] [\fB-R\fR \fIrootpath\fR]
31 \fBpkgadm dbstatus\fR [\fB-R\fR \fIrootpath\fR]
36 \fBpkgadm sync\fR [\fB-R\fR \fIrootpath\fR] [\fB-q\fR]
52 The \fBpkgadm\fR utility is used for managing the packaging and patching
53 system. It has several subcommands that perform various operations relating to
54 packaging. The \fBpkgadm\fR command includes subcommands for managing
55 certificates and keys used.
56 .SS "Managing Keys and Certificates"
59 \fBpkgadm\fR maintains the packaging-system-wide keystore in
60 \fB/var/sadm/security\fR, and individual user's certificates in
61 \fB~/.pkg/security\fR. The following subcommands operate on the package
70 Add (import) a certificate into the database, with optional trust. Once added,
71 trusted certificates can be used to verify signed packages and patches.
72 Non-trusted user certificates and their associated keys can be used to sign
73 packages and patches. Added user certificates are \fBnot\fR used to build
74 certificate chains during certificate verification.
80 \fB\fBremovecert\fR\fR
84 Removes a user certificate/private key pair, or a trusted certificate authority
85 certificate from the keystore. Once removed, the certificate and keys cannot be
96 Print details of one or more certificates in the keystore.
106 Writes the contents file and rolls the contents log file. With use of the
107 \fB-q\fR option, forces the contents file server to quit.
110 .SS "Internal Install Database"
113 The Solaris operating system relies upon enhanced System V revision 4 (SVr4)
114 packages as the basis for its software installation and revision management.
115 The package maintenance software stores information about installed packages in
116 an internal database. The \fBpkgadm\fR subcomand \fBdbstatus\fR is used to
117 determine how the package internal database is implemented. The \fBdbstatus\fR
118 command returns a string that indicates the type of internal database in use.
119 In the current implementation, the \fBdbstatus\fR command always returns the
120 string \fBtext\fR, which indicates that the \fBcontents\fR(4) package database
121 is inuse. Future releases of Solaris might supply alternative database
126 The following options are supported:
130 \fB\fB-a\fR \fIapp\fR\fR
134 If this option is used, then the command only affects the keystore associated
135 with a particular application. Otherwise, the global keystore is affected.
141 \fB\fB-e\fR \fIkeyfile\fR\fR
145 When adding a non-trusted certificate/key combination, this option can be used
146 to specify the file that contains the private key. If this option is not used,
147 the private key must be in the same file as the certificate being added.
153 \fB\fB-f\fR \fIformat\fR\fR
157 When adding certificates, this specifies the format to expect certificates and
158 private keys in. Possible values when adding are:
166 Certificate and any private key uses PEM encoding.
176 Certificate and any private key uses DER encoding.
179 When printing certificates, this specifies the output format used when
180 printing. Acceptable values for format are:
188 Output each certificate using PEM encoding.
198 Output each certificate using DER encoding.
208 Output each certificate in human-readable format.
216 \fB\fB-k\fR \fIkeystore\fR\fR
220 Overrides the default location used when accessing the keystore.
226 \fB\fB-n\fR \fIname\fR\fR
230 Identifies the entity in the store on which you want to operate. When adding a
231 user certificate, or removing certificates, this name is required. The name is
232 associated with the certificate/key combination, and when adding, can be used
233 later to reference the entity. When printing certificates, if no alias is
234 supplied, then all keystore entities are printed.
240 \fB\fB-o\fR \fIoutfile\fR\fR
244 Output the result of the command to \fIoutfile\fR. Only used when examining
245 (printing) certificates from the key store. Standard out is the default.
251 \fB\fB-P\fR \fIpassarg\fR\fR
255 Password retrieval method to use to decrypt keystore specified with \fB-k\fR,
256 if required. See \fBPASS PHRASE ARGUMENTS\fR in \fBpkgadd\fR(1M) for more
257 information about the format of this option's argument. \fBconsole\fR is the
264 \fB\fB-p\fR \fIimport_passarg\fR\fR
268 This option's argument is identical to \fB-P\fR, but is used for supplying the
269 password used to decrypt the certificate and/or private key being added.
270 \fBconsole\fR is the default.
280 (Applies to \fBsync\fR subcommand.) Shuts down the contents file cache daemon.
286 \fB\fB-R\fR \fIrootpath\fR\fR
290 Defines the full name of a directory to use as the root (\fB/\fR) path. The
291 default user location of the certificate operations is \fB${HOME}/.pkg\fR. If
292 the \fB-R\fR option is supplied, the certificates and keys will be stored under
293 \fB\fI<altroot>\fR/var/sadm/security\fR. Note that this operation fails if the
294 user does not have sufficient permissions to access this directory. The
295 \fBlistcert\fR command requires read permission, while \fBaddcert\fR and
296 \fBremovecert\fR require both read and write permission.
301 The root file system of any non-global zones must not be referenced with the
302 \fB-R\fR option. Doing so might damage the global zone's file system, might
303 compromise the security of the global zone, and might damage the non-global
304 zone's file system. See \fBzones\fR(5).
315 Indicates the certificate being added is a trusted CA certificate. The details
316 of the certificate (including the Subject Name, Validity Dates, and
317 Fingerprints) are printed and the user is asked to verify the data. This
318 verification step can be skipped with \fB-y\fR. When importing a trusted
319 certificate, a private key should not be supplied, and will be rejected if
320 supplied. Once a certificate is trusted, it can be used as a trust anchor when
321 verifying future untrusted certificates.
331 Print version associated with packaging tools.
341 When adding a trusted certificate, the details of the certificate (Subject
342 name, Issuer name, Validity dates, Fingerprints) are shown to the user and the
343 user is asked to verify the correctness before proceeding. With \fB-y\fR, this
344 additional verification step is skipped.
360 The following operand is supported:
368 File containing the certificate and optional private key, used when adding a
369 trust anchor or certificate/key combination. Certificates must be encoded using
376 All keystore entries (user cert/key and trusted certificate entries) are
377 accessed via unique aliases. Aliases are case-sensitive.
380 An alias is specified when you add an entity to a keystore using the
381 \fBaddcert\fR or \fBtrustcert\fR subcommand. If an alias is not supplied for a
382 trust anchor, the trust anchor's Common Name is used as the alias. An alias is
383 required when adding a signing certificate or chain certificate. Subsequent
384 \fBpkgcert\fR or other package tool commands must use this same alias to refer
386 .SH KEYSTORE PASSWORDS
389 See the \fBpkgadd\fR(1M) man page for a description of the passwords supplied
390 to the \fBpkgadm\fR utility.
393 \fBExample 1 \fRAdding a Trust Anchor
396 The following example adds a well-known and trusted certificate to be used when
397 verifying signatures on packages.
402 example% pkgadm addcert -t /tmp/certfile.pem
408 \fBExample 2 \fRAdding a Signing Certificate
411 The following example adds a signing certificate and associated private key,
412 each of which is in a separate file, which can then be used to sign packages.
417 example% pkgadm addcert -a pkgtrans -e /tmp/keyfile.pem \e
424 \fBExample 3 \fRPrinting Certificates
427 The following example prints all certificates in the root keystore.
432 example% pkgadm listcert
445 successful completion
461 See \fBattributes\fR(5) for descriptions of the following attributes:
469 ATTRIBUTE TYPE ATTRIBUTE VALUE
471 Interface Stability Evolving
477 \fBpkginfo\fR(1), \fBpkgmk\fR(1), \fBpkgparam\fR(1), \fBpkgproto\fR(1),
478 \fBpkgtrans\fR(1), \fBsvcs\fR(1), \fBinstallf\fR(1M), \fBpkgadd\fR(1M),
479 \fBpkgask\fR(1M), \fBpkgrm\fR(1M), \fBremovef\fR(1M), \fBsvcadm\fR(1M),
480 \fBadmin\fR(4), \fBcontents\fR(4), \fBexec_attr\fR(4), \fBpkginfo\fR(4),
481 \fBattributes\fR(5), \fBrbac\fR(5), \fBsmf\fR(5)
488 The service for \fBpkgadm\fR is managed by the service management facility,
489 \fBsmf\fR(5), under the service identifier:
500 Administrative actions on this service, such as enabling, disabling, or
501 requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
502 status can be queried using the \fBsvcs\fR(1) command.