praudit - 输出审计迹文件的内容
praudit [-lrsx] [-ddel] [filename]...
praudit reads the listed filenames (or standard input, if no filename is specified) and interprets the data as audit trail records as defined in the audit.log(5) man page.缺省情况下,次数、用户和组 ID(分别为 UID 和 GID)将转换为其 ASCII 表示。记录类型和事件字段将转换为其 ASCII 表示。只有具有 PRIV_FILE_DAC_READ 特权的用户才能使用 praudit 实用程序。如果已启用 Trusted Extensions,用户必须具有 PRIV_SYS_TRANS_LABEL 特权。这些特权都包含在 Audit Review 权限配置文件中。
支持以下选项:
使用 del 作为字段分隔符,而不是使用缺省的逗号分隔符。如果 del 对于 shell 具有特殊意义,必须使用引号将其括起来。分隔符的最大大小为三个字符。如果指定了 –x 选项,分隔符将没有任何意义,因此不会使用它。
按每个记录一行的形式列显。
按记录的原始格式列显记录。次数、UID、GID、记录类型以及事件均显示为整数。此选项在命名服务处于脱机状态时非常有用。–r 选项和 –s 选项互斥。如果同时使用了这两个选项,输出将为格式用法错误消息。
按记录的短格式显示记录。数字字段的 ASCII 等效项是通过 /etc/nsswitch.conf 文件(请参见 nsswitch.conf(5))中指定的资源进行查找的。所有数字字段在转换为 ASCII 后才能显示。将使用记录类型和事件字段的短 ASCII 表示。此选项和 –r 选项互斥。如果同时使用了这两个选项,输出将为格式用法错误消息。
以 XML 格式列显记录。在输出中将包含标记,以标识相应的标记和标记中的字段。输出的开头为有效的 XML prolog,其中包括可用于解析 XML 的 DTD 标识。
审计事件定义和类映射。
Audit class definitions.
该目录包含 XML 输出中引用的标明版本号的 DTD 文件(例如 adt_record.dtd.1)。
该目录包含 XML 输出中引用的标明版本号的 XSL 文件(例如 adt_record.xsl.1)。
To print a subset of audit records, use the auditreduce(8) utility to filter the contents of the audit log to select records for printing before passing them to praudit.
# auditreduce -c lo /var/audit/* | praudit -x | xsltproc - > logins.html
有关下列属性的说明,请参见 attributes(7):
|
The command stability is Committed.The output format is Uncommitted.
xsltproc(1), getpwuid(3C), audit.log(5), audit_class(5), audit_event(5), group(5), nsswitch.conf(5), passwd(5), attributes(7), privileges(7), auditrecord(8), auditreduce(8), getent(8)