Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #261887

Re: apt-get aborts in subshell with redirections on Debian 12

From Michael <ml@hemathor.de>
Newsgroups linux.debian.user
Subject Re: apt-get aborts in subshell with redirections on Debian 12
Date 2023-09-25 11:20 +0200
Message-ID <HhPUZ-bpJA-11@gated-at.bofh.it> (permalink)
References (2 earlier) <HhwyZ-bdIW-5@gated-at.bofh.it> <HhHup-bkoN-1@gated-at.bofh.it> <HhHNM-bkuD-3@gated-at.bofh.it> <HhJZf-blOm-3@gated-at.bofh.it> <HhKLD-bmjt-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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...

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

apt-get aborts in subshell with redirections on Debian 12 John Crawley <john@bunsenlabs.org> - 2023-09-24 09:40 +0200
  Re: apt-get aborts in subshell with redirections on Debian 12 Michel Verdier <mv524@free.fr> - 2023-09-24 12:10 +0200
    Re: apt-get aborts in subshell with redirections on Debian 12 Greg Wooledge <greg@wooledge.org> - 2023-09-24 14:40 +0200
      Re: apt-get aborts in subshell with redirections on Debian 12 John Crawley <john@bunsenlabs.org> - 2023-09-25 02:20 +0200
        Re: apt-get aborts in subshell with redirections on Debian 12 Greg Wooledge <greg@wooledge.org> - 2023-09-25 02:40 +0200
          Re: apt-get aborts in subshell with redirections on Debian 12 John Crawley <john@bunsenlabs.org> - 2023-09-25 05:00 +0200
            Re: apt-get aborts in subshell with redirections on Debian 12 John Crawley <john@bunsenlabs.org> - 2023-09-25 05:20 +0200
            Re: apt-get aborts in subshell with redirections on Debian 12 Greg Wooledge <greg@wooledge.org> - 2023-09-25 05:50 +0200
              Re: apt-get aborts in subshell with redirections on Debian 12 John Crawley <john@bunsenlabs.org> - 2023-09-25 06:40 +0200
                Re: apt-get aborts in subshell with redirections on Debian 12 Greg Wooledge <greg@wooledge.org> - 2023-09-25 13:30 +0200
                Re: apt-get aborts in subshell with redirections on Debian 12 John Crawley <john@bunsenlabs.org> - 2023-09-26 04:40 +0200
              Re: apt-get aborts in subshell with redirections on Debian 12 Michael <ml@hemathor.de> - 2023-09-25 11:20 +0200
                Re: apt-get aborts in subshell with redirections on Debian 12 Greg Wooledge <greg@wooledge.org> - 2023-09-25 13:30 +0200
                Re: apt-get aborts in subshell with redirections on Debian 12 John Crawley <john@bunsenlabs.org> - 2023-09-26 05:00 +0200
                Re: apt-get aborts in subshell with redirections on Debian 12 Greg Wooledge <greg@wooledge.org> - 2023-09-26 05:10 +0200
                Re: apt-get aborts in subshell with redirections on Debian 12 John Crawley <john@bunsenlabs.org> - 2023-09-26 05:20 +0200
                sudo+use_pty+urxvt+pipe [WAS: apt-get aborts in subshell with  redirections on Debian 12] John Crawley <john@bunsenlabs.org> - 2023-12-24 09:50 +0100

csiph-web