Quantcast
Channel: sudo: no tty present and no askpass program specified - Ask Ubuntu
Viewing all articles
Browse latest Browse all 7

Answer by elika kohen for sudo: no tty present and no askpass program specified

$
0
0

Question:

How can I work around this?

sudo: no tty present and no askpass program specified

Alternate Answer

As an alternative, try:

sudo -S ./[yourExecutable]

This directs sudo to read the password from the standard input, stdin.

Scenarios where this Helps

In chroot environments, these other answers may not work correctly ... perhaps because:

  1. /etc/shadow vs /etc/passwd conflict not allowing the user to enter a password.
  2. In a chroot-ed environment, access to tty1 can be a bit glitchy, and ctrl-alt f2 -- to tty2 is unfeasible, because it is a tty of the non-chroot-ed environment.

For example: Manually installing / repairing linux or the bootloader, using a chroot environment, (such as Archlinux and arch-chroot).


Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>