Accept/Reject Logging

Privilege Management for Unix and Linux also generates an event log entry that notes when a job is accepted or rejected and when an accepted job finishes running. The pblog program enables you to selectively choose and display log entries in a file that is specified by eventlog. The variable event is set to the event type (Accept, Reject, or Finish). pblog’s options enable you to specify only certain entries to print, set the output, and specify the format for each event type, or print all of the variables that are stored with each entry. When a job finishes running, the variable exitstatus describes how it finished; exitdate and exittime specify when it finished running.

If the exitstatus is undefined, then the exittime is not logged to the event log. It thus becomes unavailable for the event on which the exitstatus is undefined.

Whenever an attempt is made to run a command through pbrun, the attempt is appended to the event log. The default location of the event log is usually /var/adm/pb.eventlog, /usr/adm/pb.eventlog, or /var/log/pb.eventlog, depending on your operating system. The location of this log file can be changed by setting the eventlog setting in the settings file or by using the eventlog variable in a policy file. The event log is a data file and any attempt to edit the file or it might corrupt it. To read the contents of an event log, execute the pblog command.