User Tools

Site Tools


linux:sudo:sudoers:log_sudo_command_input_output

Linux - Sudo - Sudoers - Log Sudo Command Input/Output

The log_input and log_output parameters enable sudo to run a command in pseudo-tty and log all user input and all output sent to the screen receptively.

  • The default I/O log directory is /var/log/sudo-io, and if there is a session sequence number, it is stored in this directory.

A custom directory can be specified through the iolog_dir parameter.

Defaults   log_input, log_output

NOTE: There are some escape sequences supported such as %{seq} which expands to a monotonically increasing base-36 sequence number, such as 000001, where every two digits are used to form a new directory, e.g. 00/00/01 as in the example below:

cd /var/log/sudo-io/
ls
cd  00/00/01
ls
cat log
linux/sudo/sudoers/log_sudo_command_input_output.txt · Last modified: 2023/07/17 21:11 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki