1 .\" Automatically generated from an mdoc input file. Do not edit.
3 .\" SPDX-License-Identifier: ISC
5 .\" Copyright (c) 2009-2018 Todd C. Miller <Todd.Miller@sudo.ws>
7 .\" Permission to use, copy, modify, and distribute this software for any
8 .\" purpose with or without fee is hereby granted, provided that the above
9 .\" copyright notice and this permission notice appear in all copies.
11 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 .TH "SUDOREPLAY" "@mansectsu@" "October 6, 2018" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
24 \- replay sudo session logs
29 [\fB\-d\fR\ \fIdir\fR]
30 [\fB\-f\fR\ \fIfilter\fR]
31 [\fB\-m\fR\ \fInum\fR]
32 [\fB\-s\fR\ \fInum\fR]
37 [\fB\-d\fR\ \fIdir\fR]
42 plays back or lists the output logs created by
46 can play the session back in real-time, or the playback speed may be
47 adjusted (faster or slower) based on the command line options.
51 should either be a six character sequence of digits and
52 upper case letters, e.g.,
54 or a pattern matching the
59 When a command is run via
67 string is logged via syslog or to the
72 may also be determined using
78 can be used to find the ID of a session based on a number of criteria
79 such as the user, tty or command run.
81 In replay mode, if the standard input and output are connected to a terminal
84 option is not specified,
86 will operate interactively.
89 will attempt to adjust the terminal size to match that of the session and
90 write directly to the terminal (not all terminals support this).
91 Additionally, it will poll the keyboard and act on the following keys:
93 \(oq\fR\en\fR\(cq or \(oq\fR\er\fR\(cq
94 Skip to the next replay event; useful for long pauses.
96 \(oq\fR\ \fR\(cq (space)
97 Pause output; press any key to resume.
100 Reduce the playback speed by one half.
103 Double the playback speed.
105 The session can be interrupted via control-C.
106 When the session has finished, the terminal is restored to its
107 original size if it was changed during playback.
109 The options are as follows:
111 \fB\-d\fR \fIdir\fR, \fB\--directory\fR=\fIdir\fR
112 Store session logs in
114 instead of the default,
117 \fB\-f\fR \fIfilter\fR, \fB\--filter\fR=\fIfilter\fR
118 Select which I/O type(s) to display.
121 will display the command's standard output, standard error and tty output.
124 argument is a comma-separated list, consisting of one or more of following:
132 \fB\-h\fR, \fB\--help\fR
133 Display a short help message to the standard output and exit.
135 \fB\-l\fR, \fB\--list\fR [\fIsearch expression\fR]
140 will list available sessions in a format similar to the
142 log file format, sorted by file name (or sequence number).
144 \fIsearch expression\fR
145 is specified, it will be used to restrict the IDs that are displayed.
146 An expression is composed of the following predicates:
151 command \fIpattern\fR
152 Evaluates to true if the command run matches the POSIX extended
158 Evaluates to true if the command was run with the specified current
162 Evaluates to true if the command was run on or after
165 \fIDate and time format\fR
166 for a description of supported date and time formats.
168 group \fIrunas_group\fR
169 Evaluates to true if the command was run with the specified
173 was explicitly specified when
175 was run this field will be empty in the log.
177 runas \fIrunas_user\fR
178 Evaluates to true if the command was run as the specified
182 runs commands as user
187 Evaluates to true if the command was run on or prior to
190 \fIDate and time format\fR
191 for a description of supported date and time formats.
194 Evaluates to true if the command was run on the specified terminal device.
197 should be specified without the
205 Evaluates to true if the ID matches a command run by
208 Predicates may be abbreviated to the shortest unique string.
210 Predicates may be combined using
219 grouping (note that parentheses must generally be escaped from the shell).
222 operator is optional, adjacent predicates have an implied
224 unless separated by an
228 \fB\-m\fR, \fB\--max-wait\fR \fImax_wait\fR
229 Specify an upper bound on how long to wait between key presses or output data.
232 will accurately reproduce the delays between key presses or program output.
233 However, this can be tedious when the session includes long pauses.
238 will limit these pauses to at most
241 The value may be specified as a floating point number, e.g.,
245 of zero or less will eliminate the pauses entirely.
247 \fB\-n\fR, \fB\--non-interactive\fR
248 Do not prompt for user input or attempt to re-size the terminal.
249 The session is written to the standard output, not directly to
252 \fB\-R\fR, \fB\--no-resize\fR
253 Do not attempt to re-size the terminal to match the terminal size
256 \fB\-S\fR, \fB\--suspend-wait\fR
257 Wait while the command was suspended.
260 will ignore the time interval between when the command was suspended
261 and when it was resumed.
268 \fB\-s\fR, \fB\--speed\fR \fIspeed_factor\fR
271 to adjust the number of seconds it will wait between key presses or
273 This can be used to slow down or speed up the display.
278 would make the output twice as fast whereas a
282 would make the output twice as slow.
284 \fB\-V\fR, \fB\--version\fR
287 versions version number and exit.
288 .SS "Date and time format"
289 The time and date may be specified multiple ways, common formats include:
291 HH:MM:SS am MM/DD/CCYY timezone
292 24 hour time may be used in place of am/pm.
294 HH:MM:SS am Month, Day Year timezone
295 24 hour time may be used in place of am/pm, and month and day names
297 Note that month and day of the week names must be specified in English.
302 DD Month CCYY HH:MM:SS
303 The month name may be abbreviated.
305 Either time or date may be omitted, the am/pm and timezone are optional.
306 If no date is specified, the current day is assumed; if no time is
307 specified, the first second of the specified date is used.
308 The less significant parts of both time and date may also be omitted,
309 in which case zero is assumed.
311 The following are all valid time and date specifications:
314 The current time and date.
317 Exactly one day from now.
326 The first second of the Friday in the next (upcoming) week.
327 Not to be confused with
329 which would match the Friday of the current week.
332 The current time but 7 days ago.
333 This is equivalent to
337 The current time but 14 days ago.
340 10:01 am, September 17, 2009.
343 10:01 am on the current day.
346 10:00 am on the current day.
349 00:00 am, September 17, 2009.
351 10:01 am Sep 17, 2009
352 10:01 am, September 17, 2009.
354 Note that relative time specifications do not always work as expected.
357 qualifier is intended to be used in conjunction with a day such as
359 When used with units of weeks, months, years, etc
360 the result will be one more than expected.
363 will result in a time exactly two weeks from now, which is probably
364 not what was intended.
365 This will be addressed in a future version of
367 .SS "Debugging sudoreplay"
369 versions 1.8.4 and higher support a flexible debugging framework
370 that is configured via
373 sudo.conf(@mansectform@)
376 For more information on configuring
377 sudo.conf(@mansectform@),
378 please refer to its manual.
381 \fI@sysconfdir@/sudo.conf\fR
382 Debugging framework configuration
385 The default I/O log directory.
387 \fI@iolog_dir@/00/00/01/log\fR
388 Example session log info.
390 \fI@iolog_dir@/00/00/01/stdin\fR
391 Example session standard input log.
393 \fI@iolog_dir@/00/00/01/stdout\fR
394 Example session standard output log.
396 \fI@iolog_dir@/00/00/01/stderr\fR
397 Example session standard error log.
399 \fI@iolog_dir@/00/00/01/ttyin\fR
400 Example session tty input file.
402 \fI@iolog_dir@/00/00/01/ttyout\fR
403 Example session tty output file.
405 \fI@iolog_dir@/00/00/01/timing\fR
406 Example session timing file.
413 files will be empty unless
415 was used as part of a pipeline for a particular command.
417 List sessions run by user
422 # sudoreplay -l user millert
426 List sessions run by user
428 with a command containing the string vi:
432 # sudoreplay -l user bob command vi
436 List sessions run by user
438 that match a regular expression:
442 # sudoreplay -l user jeff command '/bin/[a-z]*sh'
446 List sessions run by jeff or bob on the console:
450 # sudoreplay -l ( user jeff or user bob ) tty console
455 sudo.conf(@mansectform@),
458 Many people have worked on
460 over the years; this version consists of code written primarily by:
466 See the CONTRIBUTORS file in the
468 distribution (https://www.sudo.ws/contributors.html) for an
469 exhaustive list of people who have contributed to
472 If you feel you have found a bug in
474 please submit a bug report at https://bugzilla.sudo.ws/
476 Limited free support is available via the sudo-users mailing list,
477 see https://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or
483 and any express or implied warranties, including, but not limited
484 to, the implied warranties of merchantability and fitness for a
485 particular purpose are disclaimed.
486 See the LICENSE file distributed with
488 or https://www.sudo.ws/license.html for complete details.