サポートと今すぐチャット
サポートとのチャット

Safeguard for Sudo 7.3 - Administration Guide

Introducing Safeguard for Sudo Planning Deployment Installation and Configuration Upgrade Safeguard for Sudo System Administration Managing Security Policy Administering Log and Keystroke Files Supported sudo plugins Troubleshooting Safeguard for Sudo Variables Safeguard for Sudo programs Installation Packages Supported Sudoers directives Unsupported Sudo Options Safeguard for Sudo Policy Evaluation

pmremlog

Syntax
pmremlog -v  
pmremlog -p pmlog|pmreplay|pmlogtxtsearch [-o <outfile>] 
pmremlog [-h <host>] [-b] [-c] -- <program args>
Description

The pmremlog command provides a wrapper for the pmlog and pmreplay utilities to access the event (audit) and keystroke (I/O) logs on any server in the policy group. Anyone in the pmlog group can run this utility on the primary policy server.

Note that pmlogtxtsearch is a command located in /opt/quest/libexec.

Options

pmremlog has the following options.

Table 39: Options: pmremlog
Option Description

-b

Disables interactive input and uses batch mode.

-c

Displays output in CSV, rather than human-readable format.

-h <host>

Specifies a host in the policy server group to access.

-o <outfile>

Saves the pmlog output to a file.

-p

Specifies program to run:

  • pmlog

  • pmreplay

  • pmlogtxtsearch

-v

Displays the Safeguard for Sudo version number.

Examples

To view the audit log on the primary policy server, enter:

pmremlog -p pmlog -- -f /var/opt/quest/qpm4u/pmevents.db

To view the audit events for user fred on secondary policy server host1, save the pmlog output to a file, and display the result of the pmremlog command in CSV format, enter:

pmremlog -p pmlog -c -o /tmp/events.txt -h host1 -- --user fred

To view the stdout from keystroke log id_host1_x3jfuy, on secondary policy server host1, enter:

pmremlog -p pmreplay -h host1 -- -o -f /var/opt/quest/qpm4u/iologs/id_host1_x3jfuy

To retrieve the contents of keystroke log id_host1_x3jfuy, from secondary policy server host1, formatted for the pmreplay GUI, save the output to a temporary file, and display the result of the pmremlog command in CSV format, enter:

pmremlog -p pmreplay -h host1 -c -o /tmp/replay -- -zz -f /var/opt/quest/qpm4u/iologs/id_host1_x3jfuy

pmreplay

Syntax
pmreplay -V 
pmreplay -[t|s|i] -[Th] <filename> 
pmreplay -[e][I][o] -[EhKTv] <filename> 
Description

Use the pmreplay command to replay a log file to review what happened during a specified privileged session. The program can also display the log file in real time.

When using Safeguard for Sudo, enable keystroke logging by configuring the log_input and log_output variables. Please consult your sudoers manual for more information about configuring keystroke logging.

pmreplay can distinguish between old and new log files. If pmreplay detects that a log file has been changed, a message displays to tell you that the integrity of the file cannot be confirmed. This also occurs if you run pmreplay in real time and the Safeguard for Sudo session that generated the events in the log file is active; that is, the client session has not completed or closed yet. In this case, the message does not necessarily indicate that the file has been tampered with.

The name of the I/O log is a unique filename constructed with the mktemp function using a combination of policy file variables, such as username, command, date, and time.

Safeguard for Sudo sets the permissions on the I/O log file so that only root and users in the pmlog group can read it. That way, ordinary users cannot examine the contents of the log files. You must be logged in as root or be a member of the pmlog group to use pmreplay on these files. You may want to allow users to use Safeguard for Sudo to run pmreplay.

By default pmreplay runs in interactive mode. Enter ? to display a list of the interactive commands you can use to navigate through the file.

For example, replay a log file interactively by typing:

pmreplay /var/opt/quest/qpm4u/iolog/demo/dan/id_20130221_0855_gJfeP4

the results will show a header similar to this:

 Log File : /var/opt/quest/qpm4u/iolog/demo/dan/id_20130221_0855_gJfeP4 Date : 2013/02/21 Time : 08:55:17 Client : dan@sala.abc.local Agent : root@sala.abc.local Command : id Type ’?’ or ’h’ for help

Type ? or h at any time while running in interactive mode to display the list of commands that are available.

Options

pmreplay has the following options.

Table 40: Options: pmreplay
Option Description

-e

Dumps the recorded standard error.

-E

Includes vi editing sessions when used with -K.

-h

When used with -o or -I, prints an optional header line. The header is always printed in interactive mode.

-i

Replays the recorded standard input.

-I

Dumps the recorded standard input, but converts carriage returns to new lines in order to improve readability.

-K

When used with -e, -I, and -o, removes all control characters and excludes vi editing sessions. Use with -E to include vi editing sessions.

-o

Dumps the recorded standard output.

-s

Automatically replays the file in slide show mode.

Use + and - keys to vary the speed of play.

-t

Replays the file in tail mode, displaying new activity as it occurs.

-T

Displays command timestamps.

-v

Prints unprintable characters in octal form (\###).

-V

Displays the Safeguard for Sudo version number.

Exit codes

pmreplay returns these codes:

  • 1: File format error – Cannot parse the logfile.

  • 2: File access error – Cannot open the logfile for reading

  • 4: Usage error – Incorrect parameters were passed on the command line

  • 8: Digest error – The contents of the file and the digest in the header do not match

Navigating the log file

Use the following commands to navigate the log file in interactive mode.

Table 41: Log file navigation shortcuts
Command Description

g

Go to start of file.

G

Go to end of file.

p

Pause or resume replay in slide show mode.

q

Quit the replay.

r

Redraw the log file from start.

s

Skip to next time marker. Allows you to see what happened each second.

t

Display time of an action at any point in the log file.

u

Undo your last action.

v

Display all environment variables in use at the time the log file was created.

Space key

Go to next position (usually a single character); that is, step forward through the log file.

Enter key

Go to next line.

Backspace key

Back up to last position; that is, step backwards through the log file.

/<Regular Expression> Enter

Search for a mode.

/Enter

Repeat last search.

Display the time of an action at any point in the log file with t, redraw the log file with r, and undo your last action with u.

You can also display all the environment variables which were in use at the time the log file was created using v. Use q or Q to quit pmreplay.

Type any key to continue replaying the I/O log.

pmresolvehost

Syntax
pmresolvehost -p|-v|[-h <hostname>] [-q][-s yes|no]
Description

The pmresolvehost command verifies the host name / IP resolution for the local host or for a selected host. If you do not supply arguments, pmresolvehost checks the local host name/IP resolution.

Options

pmresolvehost has the following options.

Table 42: Options: pmresolvehost
Option Description

-h <hostname>

Verifies the selected host name.

-p

Prints the fully qualified local host name.

-q

Runs in silent mode; displays no errors.

-s

Specifies whether to allow short names.

-v

Displays the Safeguard for Sudo version.

関連ドキュメント

The document was helpful.

評価を選択

I easily found the information I needed.

評価を選択