1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
|
'\" te
.\" Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH AUDITREDUCE 8 "Mar 6, 2017"
.SH NAME
auditreduce \- merge and select audit records from audit trail files
.SH SYNOPSIS
.LP
.nf
\fBauditreduce\fR [\fIoptions\fR] [\fIaudit-trail-file\fR]...
.fi
.SH DESCRIPTION
.LP
\fBauditreduce\fR allows you to select or merge records from audit trail files.
Audit files can be from one or more machines.
.sp
.LP
The merge function merges together audit records from one or more input audit
trail files into a single output file. The records in an audit trail file are
assumed to be sorted in chronological order (oldest first) and this order is
maintained by \fBauditreduce\fR in the output file.
.sp
.LP
Unless instructed otherwise, \fBauditreduce\fR will merge the entire audit
trail, which consists of all the audit trail files in the directory structure
\fIaudit_root_dir\fR/*/files. Unless specified with the -\fBR\fR or -\fBS\fR
option, \fIaudit_root_dir\fR defaults to \fB/etc/security/audit\fR. By using
the file selection options it is possible to select some subset of these files,
or files from another directory, or files named explicitly on the command line.
.sp
.LP
The select function allows audit records to be selected on the basis of
numerous criteria relating to the record's content (see \fBaudit.log\fR(5) for
details of record content). A record must meet all of the
\fIrecord-selection-option\fR criteria to be selected.
.SS "Audit Trail Filename Format"
.LP
Any audit trail file not named on the command line must conform to the audit
trail filename format. Files produced by the audit system already have this
format. Output file names produced by \fBauditreduce\fR are in this format. It
is:
.sp
.in +2
.nf
\fIstart-time\fR\fB\&.\fR\fI\|end-time\fR\fB\&.\fR\fI\|suffix\fR
.fi
.in -2
.sp
.sp
.LP
where \fIstart-time\fR is the 14-character timestamp of when the file was
opened, \fIend-time\fR is the 14-character timestamp of when the file was
closed, and \fIsuffix\fR is the name of the machine which generated the audit
trail file, or some other meaningful suffix (for example, \fBall\fR, if the
file contains a combined group of records from many machines). The
\fIend-time\fR can be the literal string \fBnot_terminated\fR, to indicate that
the file is still being written to by the audit system. Timestamps are of the
form \fIyyyymmddhhmmss\fR (year, month, day, hour, minute, second). The
timestamps are in Greenwich Mean Time (GMT).
.SH OPTIONS
.SS "File Selection Options"
.LP
The file selection options indicate which files are to be processed and certain
types of special treatment.
.sp
.ne 2
.na
\fB\fB-A\fR\fR
.ad
.sp .6
.RS 4n
All of the records from the input files will be selected regardless of their
timestamp. This option effectively disables the \fB-a\fR, \fB-b\fR, and
\fB-d\fR options. This is useful in preventing the loss of records if the
\fB-D\fR option is used to delete the input files after they are processed.
Note, however, that if a record is \fInot\fR selected due to another option,
then \fB-A\fR will not override that.
.RE
.sp
.ne 2
.na
\fB\fB-C\fR\fR
.ad
.sp .6
.RS 4n
Only process complete files. Files whose filename \fIend-time\fR timestamp is
\fBnot_terminated\fR are not processed (such a file is currently being written
to by the audit system). This is useful in preventing the loss of records if
\fB-D\fR is used to delete the input files after they are processed. It does
not apply to files specified on the command line.
.RE
.sp
.ne 2
.na
\fB\fB-D\fR \fIsuffix\fR\fR
.ad
.sp .6
.RS 4n
Delete input files after they are read if the entire run is successful. If
\fBauditreduce\fR detects an error while reading a file, then that file is not
deleted. If \fB-D\fR is specified, \fB-A\fR, \fB-C\fR and \fB-O\fR are also
implied. \fIsuffix\fR is given to the \fB-O\fR option. This helps prevent the
loss of audit records by ensuring that all of the records are written, only
complete files are processed, and the records are written to a file before
being deleted. Note that if both \fB-D\fR and \fB-O\fR are specified in the
command line, the order of specification is significant. The \fIsuffix\fR
associated with the latter specification is in effect.
.RE
.sp
.ne 2
.na
\fB\fB-M\fR \fImachine\fR\fR
.ad
.sp .6
.RS 4n
Allows selection of records from files with \fImachine\fR as the filename
suffix. If \fB-M\fR is not specified, all files are processed regardless of
suffix. \fB-M\fR can also be used to allow selection of records from files that
contain combined records from many machines and have a common suffix (such as
\fBall\fR).
.RE
.sp
.ne 2
.na
\fB\fB-N\fR\fR
.ad
.sp .6
.RS 4n
Select objects in \fBnew mode\fR.This flag is off by default, thus retaining
backward compatibility. In the existing, \fBold mode\fR, specifying the
\fB-e\fR, \fB-f\fR, \fB-g\fR, \fB-r\fR, or \fB-u\fR flags would select not only
actions taken with those \fBID\fRs, but also certain objects owned by those
\fBID\fRs. When running in \fBnew mode\fR, only actions are selected. In order
to select objects, the \fB-o\fR option must be used.
.RE
.sp
.ne 2
.na
\fB\fB-O\fR \fIsuffix\fR\fR
.ad
.sp .6
.RS 4n
Direct output stream to a file in the current \fBaudit_root_dir\fR with the
indicated suffix. \fIsuffix\fR can alternatively contain a full pathname, in
which case the last component is taken as the suffix, ahead of which the
timestamps will be placed, ahead of which the remainder of the pathname will be
placed. If the \fB-O\fR option is not specified, the output is sent to the
standard output. When \fBauditreduce\fR places timestamps in the filename, it
uses the times of the first and last records in the merge as the
\fIstart-time\fR and \fIend-time\fR.
.RE
.sp
.ne 2
.na
\fB\fB-Q\fR\fR
.ad
.sp .6
.RS 4n
Quiet. Suppress notification about errors with input files.
.RE
.sp
.ne 2
.na
\fB\fB-R\fR \fIpathname\fR\fR
.ad
.sp .6
.RS 4n
Specify the pathname of an alternate audit root directory \fIaudit_root_dir\fR
to be \fIpathname\fR. Therefore, rather than using
\fB/etc/security/audit\fR/*/files by default, \fIpathname\fR/*/files will be
examined instead.
.LP
Note -
.sp
.RS 2
The root file system of any non-global zones must not be referenced with the
\fB-R\fR option. Doing so might damage the global zone's file system, might
compromise the security of the global zone, and might damage the non-global
zone's file system. See \fBzones\fR(7).
.RE
.RE
.sp
.ne 2
.na
\fB\fB-S\fR \fIserver\fR\fR
.ad
.sp .6
.RS 4n
This option causes \fBauditreduce\fR to read audit trail files from a specific
location (server directory). \fIserver\fR is normally interpreted as the name
of a subdirectory of the audit root, therefore \fBauditreduce\fR will look in
\fIaudit_root_dir\fR/\fIserver\fR/files for the audit trail files. But if
\fIserver\fR contains any `\fB/\fR' characters, it is the name of a specific
directory not necessarily contained in the audit root. In this case,
\fIserver\fR/files will be consulted. This option allows archived files to be
manipulated easily, without requiring that they be physically located in a
directory structure like that of \fB/etc/security/audit\fR.
.RE
.sp
.ne 2
.na
\fB\fB-V\fR\fR
.ad
.sp .6
.RS 4n
Verbose. Display the name of each file as it is opened, and how many records
total were written to the output stream.
.RE
.SS "Record Selection Options"
.LP
The record selection options listed below are used to indicate which records
are written to the output file produced by \fBauditreduce\fR.
.sp
.LP
Multiple arguments of the same type are not permitted.
.sp
.ne 2
.na
\fB\fB-a\fR \fIdate-time\fR\fR
.ad
.sp .6
.RS 4n
Select records that occurred at or after \fIdate-time\fR. The \fIdate-time\fR
argument is described under \fBOption Arguments\fR, below. \fIdate-time\fR is
in local time. The \fB-a\fR and \fB-b\fR options can be used together to form a
range.
.RE
.sp
.ne 2
.na
\fB\fB-b\fR \fIdate-time\fR\fR
.ad
.sp .6
.RS 4n
Select records that occurred before \fIdate-time\fR.
.RE
.sp
.ne 2
.na
\fB\fB-c\fR \fIaudit-classes\fR\fR
.ad
.sp .6
.RS 4n
Select records by audit class. Records with events that are mapped to the audit
classes specified by \fIaudit-classes\fR are selected. Audit class names are
defined in \fBaudit_class\fR(5). Using the \fBaudit\fR \fIflags,\fR one can
select records based upon success and failure criteria.
.RE
.sp
.ne 2
.na
\fB\fB-d\fR \fIdate-time\fR\fR
.ad
.sp .6
.RS 4n
Select records that occurred on a specific day (a 24-hour period beginning at
00:00:00 of the day specified and ending at 23:59:59). The day specified is in
local time. The time portion of the argument, if supplied, is ignored. Any
records with timestamps during that day are selected. If any hours, minutes, or
seconds are given in \fItime,\fR they are ignored. \fB-d\fR can not be used
with \fB-a\fR or \fB\fR\fB-b\fR\fB\&.\fR
.RE
.sp
.ne 2
.na
\fB\fB-e\fR \fIeffective-user\fR\fR
.ad
.sp .6
.RS 4n
Select records with the specified \fIeffective-user.\fR
.RE
.sp
.ne 2
.na
\fB\fB-f\fR \fIeffective-group\fR\fR
.ad
.sp .6
.RS 4n
Select records with the specified \fIeffective-group.\fR
.RE
.sp
.ne 2
.na
\fB\fB-g\fR \fIreal-group\fR\fR
.ad
.sp .6
.RS 4n
Select records with the specified \fIreal-group.\fR
.RE
.sp
.ne 2
.na
\fB\fB-j\fR \fIsubject-ID\fR\fR
.ad
.sp .6
.RS 4n
Select records with the specified \fIsubject-ID\fR where \fIsubject-ID\fR is a
process ID.
.RE
.sp
.ne 2
.na
\fB\fB-l\fR \fIlabel\fR\fR
.ad
.sp .6
.RS 4n
Select records with the specified label (or label range), as explained under
"Option Arguments," below. This option is available only if the system is
configured with Trusted Extensions.
.RE
.sp
.ne 2
.na
\fB\fB-m\fR \fIevent\fR\fR
.ad
.sp .6
.RS 4n
Select records with the indicated \fIevent\fR. The \fIevent\fR is the literal
string or the \fIevent\fR number.
.RE
.sp
.ne 2
.na
\fB\fB-o\fR \fIobject_type=objectID_value\fR\fR
.ad
.sp .6
.RS 4n
Select records by object type. A match occurs when the record contains the
information describing the specified \fIobject_type\fR and the object ID equals
the value specified by \fIobjectID_value.\fR The allowable object types and
values are as follows:
.sp
.ne 2
.na
\fBfile=\fIpathname\fR\fR
.ad
.sp .6
.RS 4n
Select records containing file system objects with the specified pathname,
where pathname is a comma separated list of regular expressions. If a regular
expression is preceded by a tilde (\fB~\fR), files matching the expression are
excluded from the output. For example, the option
\fBfile=~/usr/openwin,/usr,/etc\fR would select all files in \fB/usr\fR or
\fB/etc\fR except those in \fB/usr/openwin\fR. The order of the regular
expressions is important because auditreduce processes them from left to right,
and stops when a file is known to be either selected or excluded. Thus the
option \fBfile=\fR \fB/usr\fR, \fB/etc\fR, \fB~/usr/openwin\fR would select all
files in \fB/usr\fR and all files in \fB/etc\fR. Files in \fB/usr/openwin\fR
are not excluded because the regular expression \fB/usr\fR is matched first.
Care should be given in surrounding the \fIpathname\fR with quotes so as to
prevent the shell from expanding any tildes.
.RE
.sp
.ne 2
.na
\fBfilegroup\fI=group\fR\fR
.ad
.sp .6
.RS 4n
Select records containing file system objects with \fIgroup\fR as the owning
group.
.RE
.sp
.ne 2
.na
\fBfileowner=\fIuser\fR\fR
.ad
.sp .6
.RS 4n
Select records containing file system objects with \fIuser\fR as the owning
user.
.RE
.sp
.ne 2
.na
\fBmsgqid=\fIID\fR\fR
.ad
.sp .6
.RS 4n
Select records containing message queue objects with the specified \fIID\fR
where \fIID\fR is a message queue \fBID\fR.
.RE
.sp
.ne 2
.na
\fBmsgqgroup=\fIgroup\fR\fR
.ad
.sp .6
.RS 4n
Select records containing message queue objects with \fIgroup\fR as the owning
or creating group.
.RE
.sp
.ne 2
.na
\fBmsgqowner=\fIuser\fR\fR
.ad
.sp .6
.RS 4n
Select records containing message queue objects with \fIuser\fR as the owning
or creating user.
.RE
.sp
.ne 2
.na
\fBpid=\fIID\fR\fR
.ad
.sp .6
.RS 4n
Select records containing process objects with the specified \fIID\fR where
\fIID\fR is a process \fBID\fR. Process are objects when they are receivers of
signals.
.RE
.sp
.ne 2
.na
\fBprocgroup=\fIgroup\fR\fR
.ad
.sp .6
.RS 4n
Select records containing process objects with \fIgroup\fR as the real or
effective group.
.RE
.sp
.ne 2
.na
\fBprocowner=\fIuser\fR\fR
.ad
.sp .6
.RS 4n
Select records containing process objects with \fIuser\fR as the real or
effective user.
.RE
.sp
.ne 2
.na
\fBsemid=\fIID\fR\fR
.ad
.sp .6
.RS 4n
Select records containing semaphore objects with the specified \fIID\fR where
\fIID\fR is a semaphore \fBID\fR.
.RE
.sp
.ne 2
.na
\fBsemgroup=\fIgroup\fR\fR
.ad
.sp .6
.RS 4n
Select records containing semaphore objects with \fIgroup\fR as the owning or
creating group.
.RE
.sp
.ne 2
.na
\fBsemowner=\fIuser\fR\fR
.ad
.sp .6
.RS 4n
Select records containing semaphore objects with \fIuser\fR as the owning or
creating user.
.RE
.sp
.ne 2
.na
\fBshmid=\fIID\fR\fR
.ad
.sp .6
.RS 4n
Select records containing shared memory objects with the specified \fIID\fR
where \fIID\fR is a shared memory \fBID\fR.
.RE
.sp
.ne 2
.na
\fBshmgroup=\fIgroup\fR\fR
.ad
.sp .6
.RS 4n
Select records containing shared memory objects with \fIgroup\fR as the owning
or creating group.
.RE
.sp
.ne 2
.na
\fBshmowner=\fIuser\fR\fR
.ad
.sp .6
.RS 4n
Select records containing shared memory objects with \fIuser\fR as the owning
or creating user.
.RE
.sp
.ne 2
.na
\fBsock=\fIport_number|machine\fR\fR
.ad
.sp .6
.RS 4n
Select records containing socket objects with the specified \fIport_number\fR
or the specified \fImachine\fR where \fImachine\fR is a machine name as defined
in \fBhosts\fR(5).
.RE
.sp
.ne 2
.na
\fBfmri=\fIservice instance\fR\fR
.ad
.sp .6
.RS 4n
Select records containing fault management resource identifier (FMRI) objects
with the specified \fIservice instance\fR. See \fBsmf\fR(7).
.RE
.RE
.sp
.ne 2
.na
\fB\fB-r\fR \fIreal-user\fR\fR
.ad
.sp .6
.RS 4n
Select records with the specified \fIreal-user\fR.
.RE
.sp
.ne 2
.na
\fB\fB-s\fR \fIsession-id\fR\fR
.ad
.sp .6
.RS 4n
Select audit records with the specified \fIsession-id\fR.
.RE
.sp
.ne 2
.na
\fB\fB-u\fR \fIaudit-user\fR\fR
.ad
.sp .6
.RS 4n
Select records with the specified \fIaudit-user\fR.
.RE
.sp
.ne 2
.na
\fB\fB-z\fR \fIzone-name\fR\fR
.ad
.sp .6
.RS 4n
Select records from the specified zone name. The zone name selection is
case-sensitive.
.RE
.sp
.LP
When one or more \fIfilename\fR arguments appear on the command line, only the
named files are processed. Files specified in this way need not conform to the
audit trail filename format. However, \fB-M\fR, \fB-S\fR, and \fB-R\fR must not
be used when processing named files. If the \fIfilename\fR is ``\(mi'' then the
input is taken from the standard input.
.SS "Option Arguments"
.ne 2
.na
\fB\fIaudit-trail-file\fR\fR
.ad
.sp .6
.RS 4n
An audit trail file as defined in \fBaudit.log\fR(5). An audit trail file not
named on the command line must conform to the audit trail file name format.
Audit trail files produced as output of \fBauditreduce\fR are in this format as
well. The format is:
.sp
\fIstart-time . \|end-time . \|suffix\fR
.sp
\fIstart-time\fR is the 14 character time stamp denoting when the file was
opened. \fIend-time\fR is the 14 character time stamp denoting when the file
was closed. \fIend-time\fR can also be the literal string \fBnot_terminated\fR,
indicating the file is still be written to by the audit daemon or the file was
not closed properly (a system crash or abrupt halt occurred). \fIsuffix\fR is
the name of the machine that generated the audit trail file (or some other
meaningful suffix; for example, \fBall\fR would be a good suffix if the audit
trail file contains a combined group of records from many machines).
.RE
.sp
.ne 2
.na
\fB\fIdate-time\fR\fR
.ad
.sp .6
.RS 4n
The \fIdate-time\fR argument to \fB-a\fR, \fB-b\fR, and \fB-d\fR can be of two
forms: An absolute \fIdate-time\fR takes the form:
.sp
\fI\fR yyyymmdd [ \fIhh\fR [ \fImm\fR [ \fIss\fR ]]]
.sp
where \fIyyyy\fR specifies a year (with 1970 as the earliest value), \fImm\fR
is the month (01-12), \fBdd\fR is the day (01-31), \fIhh\fR is the hour
(00-23), \fImm\fR is the minute (00-59), and \fIss\fR is the second (00-59).
The default is 00 for \fIhh\fR, \fImm\fR and \fIss\fR.
.sp
An offset can be specified as: \fB+\fR\fIn\fR \fBd\fR|\fBh\fR|\fBm\fR| \fBs\fR
where \fIn\fR is a number of units, and the tags \fBd\fR, \fBh\fR, \fBm\fR, and
\fBs\fR stand for days, hours, minutes and seconds, respectively. An offset is
relative to the starting time. Thus, this form can only be used with the
\fB-b\fR option.
.RE
.sp
.ne 2
.na
\fB\fIevent\fR\fR
.ad
.sp .6
.RS 4n
The literal string or ordinal event number as found in \fBaudit_event\fR(5). If
\fIevent\fR is not found in the \fBaudit_event\fR file it is considered
invalid.
.RE
.sp
.ne 2
.na
\fB\fIgroup\fR\fR
.ad
.sp .6
.RS 4n
The literal string or ordinal group ID number as found in \fBgroup\fR(5). If
\fIgroup\fR is not found in the \fBgroup\fR file it is considered invalid.
\fIgroup\fR can be negative.
.RE
.sp
.ne 2
.na
\fB\fIlabel\fR\fR
.ad
.sp .6
.RS 4n
The literal string representation of a MAC label or a range of two valid MAC
labels. To specify a range, use \fBx;y\fR where \fBx\fR and \fBy\fR are valid
MAC labels. Only those records that are fully bounded by \fBx\fR and \fBy\fR
will be selected. If \fBx\fR or \fBy\fR is omitted, the default uses
\fBADMIN_LOW\fR or \fBADMIN_HIGH\fR respectively. Notice that quotes must be
used when specifying a range.
.RE
.sp
.ne 2
.na
\fB\fIpathname\fR\fR
.ad
.sp .6
.RS 4n
A regular expression describing a pathname.
.RE
.sp
.ne 2
.na
\fB\fIuser\fR\fR
.ad
.sp .6
.RS 4n
The literal username or ordinal user ID number as found in \fBpasswd\fR(5). If
the username is not found in the \fBpasswd\fR file it is considered invalid.
\fIuser\fR can be negative.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRThe auditreduce command
.sp
.LP
\fBpraudit\fR(8) is available to display audit records in a human-readable
form.
.sp
.LP
This will display the entire audit trail in a human-readable form:
.sp
.in +2
.nf
% auditreduce | praudit
.fi
.in -2
.sp
.sp
.LP
If all the audit trail files are being combined into one large file, then
deleting the original files could be desirable to prevent the records from
appearing twice:
.sp
.in +2
.nf
% auditreduce -V -D /etc/security/audit/combined/all
.fi
.in -2
.sp
.sp
.LP
This displays what user \fBmilner\fR did on April 13, 1988. The output is
displayed in a human-readable form to the standard output:
.sp
.in +2
.nf
% auditreduce -d 19880413 -u milner | praudit
.fi
.in -2
.sp
.sp
.LP
The above example might produce a large volume of data if \fBmilner\fR has been
busy. Perhaps looking at only login and logout times would be simpler. The
\fB-c\fR option will select records from a specified class:
.sp
.in +2
.nf
% auditreduce -d 19880413 -u milner -c lo | praudit
.fi
.in -2
.sp
.sp
.LP
To see \fBmilner\fR's login/logout activity for April 13, 14, and 15, the
following is used. The results are saved to a file in the current working
directory. Notice that the name of the output file will have \fBmilnerlo\fR as
the \fIsuffix\fR, with the appropriate timestamp prefixes. Notice also that the
long form of the name is used for the \fB-c\fR option:
.sp
.in +2
.nf
% auditreduce -a 19880413 -b +3d -u milner -c login_logout -O milnerlo
.fi
.in -2
.sp
.sp
.LP
To follow \fBmilner\fR's movement about the file system on April 13, 14, and 15
the \fBchdir\fR record types could be viewed. Notice that in order to get the
same time range as the above example we needed to specify the \fB-b\fR time as
the day \fBafter\fR our range. This is because \fB19880416\fR defaults to
midnight of that day, and records before that fall on \fB0415\fR, the end-day
of the range.
.sp
.in +2
.nf
% auditreduce -a 19880413 -b 19880416 -u milner -m AUE_CHDIR | praudit
.fi
.in -2
.sp
.sp
.LP
In this example, the audit records are being collected in summary form (the
login/logout records only). The records are being written to a summary file in
a different directory than the normal audit root to prevent the selected
records from existing twice in the audit root.
.sp
.in +2
.nf
% auditreduce -d 19880330 -c lo -O /etc/security/audit_summary/logins
.fi
.in -2
.sp
.sp
.LP
If activity for user \fBID\fR 9944 has been observed, but that user is not
known to the system administrator, then the command in the following example
searches the entire audit trail for any records generated by that user.
\fBauditreduce\fR queries the system about the current validity of \fBID\fR
9944 and displays a warning message if it is not currently active:
.sp
.in +2
.nf
% auditreduce -O /etc/security/audit_suspect/user9944 -u 9944
.fi
.in -2
.sp
.sp
.LP
To get an audit log of only the global zone:
.sp
.in +2
.nf
% auditreduce -z global
.fi
.in -2
.SH FILES
.ne 2
.na
\fB\fB/etc/security/audit/\fR\fIserver\fR\fB/files/*\fR\fR
.ad
.sp .6
.RS 4n
location of audit trails, when stored
.RE
.SH ATTRIBUTES
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability See below.
.TE
.sp
.LP
The command invocation is Stable. The binary file format is Stable. The binary
file contents is Unstable.
.SH SEE ALSO
.LP
.BR audit.log (5),
.BR audit_class (5),
.BR group (5),
.BR hosts (5),
.BR passwd (5),
.BR attributes (7),
.BR smf (7),
.BR praudit (8)
.SH DIAGNOSTICS
.LP
\fBauditreduce\fR displays error messages if there are command line errors and
then exits. If there are fatal errors during the run, \fBauditreduce\fR
displays an explanatory message and exits. In this case, the output file might
be in an inconsistent state (no trailer or partially written record) and
\fBauditreduce\fR displays a warning message before exiting. Successful
invocation returns \fB0\fR and unsuccessful invocation returns \fB1\fR.
.sp
.LP
Since \fBauditreduce\fR might be processing a large number of input files, it
is possible that the machine-wide limit on open files will be exceeded. If this
happens, \fBauditreduce\fR displays a message to that effect, give information
on how many file there are, and exit.
.sp
.LP
If \fBauditreduce\fR displays a record's timestamp in a diagnostic message,
that time is in local time. However, when filenames are displayed, their
timestamps are in \fBGMT\fR.
.SH BUGS
.LP
Conjunction, disjunction, negation, and grouping of record selection options
should be allowed.
.SH NOTES
.LP
The \fB-z\fR option should be used only if the audit policy \fBzonename\fR is
set. If there is no zonename token, then no records will be selected.
|