Go to main content

手册页部分 8:系统管理命令

退出打印视图

更新时间: 2022年7月27日 星期三
 
 

praudit(8)

名称

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 权限配置文件中。

选项

支持以下选项:

–ddel

使用 del 作为字段分隔符,而不是使用缺省的逗号分隔符。如果 del 对于 shell 具有特殊意义,必须使用引号将其括起来。分隔符的最大大小为三个字符。如果指定了 –x 选项,分隔符将没有任何意义,因此不会使用它。

–l

按每个记录一行的形式列显。

–r

按记录的原始格式列显记录。次数、UID、GID、记录类型以及事件均显示为整数。此选项在命名服务处于脱机状态时非常有用。–r 选项和 –s 选项互斥。如果同时使用了这两个选项,输出将为格式用法错误消息。

–s

按记录的短格式显示记录。数字字段的 ASCII 等效项是通过 /etc/nsswitch.conf 文件(请参见 nsswitch.conf(5))中指定的资源进行查找的。所有数字字段在转换为 ASCII 后才能显示。将使用记录类型和事件字段的短 ASCII 表示。此选项和 –r 选项互斥。如果同时使用了这两个选项,输出将为格式用法错误消息。

–x

以 XML 格式列显记录。在输出中将包含标记,以标识相应的标记和标记中的字段。输出的开头为有效的 XML prolog,其中包括可用于解析 XML 的 DTD 标识。

文件

/etc/security/audit_event

审计事件定义和类映射。

/etc/security/audit_class
/etc/security/audit_class.system

Audit class definitions.

/usr/share/lib/xml/dtd

该目录包含 XML 输出中引用的标明版本号的 DTD 文件(例如 adt_record.dtd.1)。

/usr/share/lib/xml/style

该目录包含 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.

示例

示例 1 生成所有登录/注销事件的 HTML 报告
# auditreduce -c lo /var/audit/* | praudit -x | xsltproc - > logins.html

属性

有关下列属性的说明,请参见 attributes(7)

属性类型
属性值
可用性
system/core-os
接口稳定性
请参见下文。

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)

Managing Auditing in Oracle Solaris 11.4》。