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.
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 PFEXEC 1 "Jul 8, 2016"
8 pfexec, pfsh, pfcsh, pfksh \- execute a command in a profile
12 \fB/usr/bin/pfexec\fR \fIcommand\fR
17 \fB/usr/bin/pfexec\fR \fB-P\fR \fIprivspec\fR \fIcommand\fR [ \fIarg\fR ]...
22 \fB/usr/bin/pfsh\fR [ \fIoptions\fR ] [ \fIargument\fR ]...
27 \fB/usr/bin/pfcsh\fR [ \fIoptions\fR ] [ \fIargument\fR ]...
32 \fB/usr/bin/pfksh\fR [ \fIoptions\fR ] [ \fIargument\fR ]...
37 The \fBpfexec\fR program is used to execute commands with the attributes
38 specified by the user's profiles in the \fBexec_attr\fR(4) database. It is
39 invoked by the profile shells, \fBpfsh\fR, \fBpfcsh\fR, and \fBpfksh\fR which
40 are linked to the Bourne shell, C shell, and Korn shell, respectively.
43 Profiles are searched in the order specified in the user's entry in the
44 \fBuser_attr\fR(4) database. If the same command appears in more than one
45 profile, the profile shell uses the first matching entry.
48 The second form, \fBpfexec\fR \fB-P\fR \fIprivspec\fR, allows a user to obtain
49 the additional privileges awarded to the user's profiles in \fBprof_attr\fR(4).
50 The privileges specification on the commands line is parsed using
51 \fBpriv_str_to_set\fR(3C). The resulting privileges are intersected with the
52 union of the privileges specified using the "\fBprivs\fR" keyword in
53 \fBprof_attr\fR(4) for all the user's profiles and added to the inheritable set
54 before executing the command.
57 For \fBpfexec\fR to function correctly, the \fBpfexecd\fR daemon must be running
58 in the current zone. This is normally managed by the
59 "\fBsvc:/system/pfexec:default\fR" SMF service (see \fBsmf\fR(5)).
62 \fBpfexec\fR is used to execute commands with predefined process attributes,
63 such as specific user or group \fBID\fRs.
66 Refer to the \fBsh\fR(1), \fBcsh\fR(1), and \fBksh\fR(1) man pages for complete
67 usage descriptions of the profile shells.
70 \fBExample 1 \fRObtaining additional user privileges
74 example% \fBpfexec -P all chown user file\fR
81 This command runs \fBchown user file\fR with all privileges assigned to the
82 current user, not necessarily all privileges.
86 The following exit values are returned:
93 Successful completion.
107 \fBcsh\fR(1), \fBksh\fR(1), \fBprofiles\fR(1), \fBsh\fR(1), \fBexec_attr\fR(4),
108 \fBprof_attr\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5), \fBsmf\fR(5)