sudo-project / sudo

Utility to execute a command as another user
https://www.sudo.ws
Other
1.2k stars 224 forks source link

sudo | pv | sudo turns off echo in terminal #337

Closed allhavebrainimplantsandmore closed 11 months ago

allhavebrainimplantsandmore commented 11 months ago

When I run sudo btrfs send -p| pv | sudo btrfs receive my GNOME terminal stops showing the typed input suddenly. It works and runs what I type but it doesn't show it on the screen.

stty -a before and after shows that this turns off echo and other attributes. The workaround is to run everything in bash -c " ".

stty -a diff: Before: icrnl ixon isig icanon iexten echo -tostop After: -icrnl -ixon -isig -icanon -iexten -echo tostop

millert commented 11 months ago

What version of sudo are you running?

allhavebrainimplantsandmore commented 11 months ago

What version of sudo are you running?

1.9.14-1.p3.fc39 (fedora)

millert commented 11 months ago

I believe this is fixed in the latest version of sudo (1.9.15p4) but as a workaround you can disable _usepty in /etc/sudoers with a line like:

Defaults !use_pty

I can also provide you with a Fedora 29 rpm to try if you would like.

allhavebrainimplantsandmore commented 11 months ago

use_pty

Thanks but I'll wait for the upstream version to get to the vanilla repo in F39. Disabling use_pty has security ramifications obviously.