hey,

i was curious, so i tried it on the only machine i have sudo installed on, which is my Debian based Ubuntu based LinuxMint Laptop.

 micha@HP-Laptop: ~
 > errors=$(sudo apt-get install mirage 2>&1 1>/dev/tty)
[sudo] password for micha: Reading package lists... Done
 Building dependency tree... Done
 Reading state information... Done
 The following additional packages will be installed:
   gir1.2-gexiv2-0.10
 The following NEW packages will be installed:
   gir1.2-gexiv2-0.10 mirage
 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
 Need to get 111 kB of archives.
 After this operation, 648 kB of additional disk space will be used.
 Do you want to continue? [Y/n] Abort.

then i switched to a shell, opened i with 'sudo tmux'

root@HP-Laptop: ~
# errors=$(apt-get install mirage 2>&1 1>/dev/tty)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
 gir1.2-gexiv2-0.10
The following NEW packages will be installed:
 gir1.2-gexiv2-0.10 mirage
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 111 kB of archives.
After this operation, 648 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

so i looked into /etc/sudoers and all /etc/sudoers.d/* and found two suspicous flags:

/etc/sudoers:
Defaults       use_pty

/etc/sudoers.d/0pwfeedback:
Defaults pwfeedback

then consulting the sudo manpage convinced me, it was the 'use_pty' flag (in section SUDOERS OPTIONS). after removing that flag everything works as 'expected':

 micha@HP-Laptop: ~
 > errors=$(sudo apt-get install mirage 2>&1 1>/dev/tty)
[sudo] password for micha: Reading package lists... Done
 Building dependency tree... Done
 Reading state information... Done
 The following additional packages will be installed:
   gir1.2-gexiv2-0.10
 The following NEW packages will be installed:
   gir1.2-gexiv2-0.10 mirage
 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
 Need to get 111 kB of archives.
 After this operation, 648 kB of additional disk space will be used.
 Do you want to continue? [Y/n] n
 Abort.

hth.

greetings...

Reply via email to