User Tools

Site Tools


linux:sudo:sudoers:run_sudo_command_using_a_pty

Linux - Sudo - Sudoers - Run Sudo Command Using a pty

A few times, attackers can run a malicious program (such as a virus or malware) using sudo, which would again fork a background process that remains on the user’s terminal device even when the main program has finished executing.

To avoid such a scenario, you can configure sudo to run other commands only from a psuedo-pty using the use_pty parameter, whether I/O logging is turned on or not as follows:

Defaults  use_pty
linux/sudo/sudoers/run_sudo_command_using_a_pty.txt · Last modified: 2023/07/17 21:06 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki