'\" te .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved .\" 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. 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 the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH PFEXEC 1 "Mar 3, 2003" .SH NAME pfexec, pfsh, pfcsh, pfksh \- execute a command in a profile .SH SYNOPSIS .LP .nf \fB/usr/bin/pfexec\fR \fIcommand\fR .fi .LP .nf \fB/usr/bin/pfexec\fR \fB-P\fR \fIprivspec\fR \fIcommand\fR [ \fIarg\fR ]... .fi .LP .nf \fB/usr/bin/pfsh\fR [ \fIoptions\fR ] [ \fIargument\fR ]... .fi .LP .nf \fB/usr/bin/pfcsh\fR [ \fIoptions\fR ] [ \fIargument\fR ]... .fi .LP .nf \fB/usr/bin/pfksh\fR [ \fIoptions\fR ] [ \fIargument\fR ]... .fi .SH DESCRIPTION .sp .LP The \fBpfexec\fR program is used to execute commands with the attributes specified by the user's profiles in the \fBexec_attr\fR(4) database. It is invoked by the profile shells, \fBpfsh\fR, \fBpfcsh\fR, and \fBpfksh\fR which are linked to the Bourne shell, C shell, and Korn shell, respectively. .sp .LP Profiles are searched in the order specified in the user's entry in the \fBuser_attr\fR(4) database. If the same command appears in more than one profile, the profile shell uses the first matching entry. .sp .LP The second form, \fBpfexec\fR \fB-P\fR \fIprivspec\fR, allows a user to obtain the additional privileges awarded to the user's profiles in \fBprof_attr\fR(4). The privileges specification on the commands line is parsed using \fBpriv_str_to_set\fR(3C). The resulting privileges are intersected with the union of the privileges specified using the "\fBprivs\fR" keyword in \fBprof_attr\fR(4) for all the user's profiles and added to the inheritable set before executing the command. .SH USAGE .sp .LP \fBpfexec\fR is used to execute commands with predefined process attributes, such as specific user or group \fBID\fRs. .sp .LP Refer to the \fBsh\fR(1), \fBcsh\fR(1), and \fBksh\fR(1) man pages for complete usage descriptions of the profile shells. .SH EXAMPLES .LP \fBExample 1 \fRObtaining additional user privileges .sp .in +2 .nf example% \fBpfexec -P all chown user file\fR .fi .in -2 .sp .sp .LP This command runs \fBchown user file\fR with all privileges assigned to the current user, not necessarily all privileges. .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .na \fB\fB0\fR \fR .ad .RS 6n Successful completion. .RE .sp .ne 2 .na \fB\fB1\fR \fR .ad .RS 6n An error occurred. .RE .SH SEE ALSO .sp .LP \fBcsh\fR(1), \fBksh\fR(1), \fBprofiles\fR(1), \fBsh\fR(1), \fBexec_attr\fR(4), \fBprof_attr\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5)