subscribe iconSubscribe to this information
POWER7 information

tracepriv command

Purpose

Traces the privileges that a command needs for a successful run.

Syntax

tracepriv [-d][-e][-f] [-o][outputfile ] Command [args]

Description

The tracepriv command records the privileges that a command attempts to use when the command is run. The tracepriv command is used for command investigation when entries are added to the privileged command database. The tracepriv command runs the command that is specified by the Command parameter with the specified arguments (with the args parameter). Generally, run the tracepriv command with the PV_ROOT privilege so that any attempt to use a privilege succeeds. In this case, the tracepriv command can keep track of all of the privileges that the Command needs for a successful run without the PV_ROOT privilege. After the Command is run or when an exec subroutine within the command occurs, the list of used privileges is written to standard output (stdout).

Important: Do not use tracepriv command with any Virtual I/O Server (VIOS commands.

Security

The tracepriv command is a privileged command. To run the command successfully, assume a role that has the authorization vios.security.priv.trace.

Flags

Flag name Description
-d Displays the output of the truss command with the privileges that are required by the command.
-e Follows the exec subroutine. If the command specified by the Command parameter runs an exec subroutine, the tracepriv command reports the privileges needed so far (and sets them if the -a flag is used), and then proceeds with recording (and setting) the privileges associated with the new executable file. If the file that is run by the exec subroutine has its setuid bit set and is not owned by root, the tracepriv command cannot properly trace the privilege use of the file.
-f Follows the fork subroutine. If the controlled process calls the fork subroutine, the tracepriv command also reports the privileges used by the new child process.
-o Writes the output to the specified file instead of the standard output (stdout).

Parameters

Parameter Description
args

Specifies the arguments.

command

Specifies the command.

outputfile

Specifies the file to record the output.

Exit Status

0 for success.

Non-zero for command error.

Examples

  1. To find the privileges to run the command myexe, type the following command:
    tracepriv /home/padmin/myexe


Send feedback Rate this page

Last updated: Wed, June 03, 2015