DE-IBH / apt-dater

terminal-based remote package update manager
GNU General Public License v2.0
101 stars 24 forks source link

sudo: no tty present and no askpass program specified #62

Closed Mebus closed 9 years ago

Mebus commented 9 years ago

Hallo,

I am trying to manage a Ubuntu and a Fedora host with apt-dater which I build from bdd5396e8d36ae61c8872f3f4808f381689f6101 but I get this error:

Pseudo-terminal will not be allocated because stdin is not a terminal. ADPROTO: 0.6 sudo: no tty present and no askpass program specified

ADPERR: Failed to execute 'sudo apt-get update' (256).

It works with some Debian hosts. What's going wrong?

Mebus

liske commented 9 years ago

Hi,

the ssh warning (Pseudo-terminal will not be allocated because stdin is not a terminal.) is triggered due to a missing -t parameter in the ssh call (should be set by the OptionalCmdFlags config option). Could you please take a look at your ~/.config/apt-dater/apt-dater.config? There should be something like OptionalCmdFlags="-t"; within the SSH block.

The sudo error depends on the remote host's sudo version/configuration - sometime its just fine w/o a tty... but more recent versions did require a valid allocated tty and will fail if there is none. Tools like debconf on Debian will horrible fallback to the Teletype frontend if there's no tty.

PLEASE BE AWARE: current git HEAD (including apt-dater 1.0.) is known to be a *unstable pre-release. Especially the config backend has several issues... it might be needed to be switched again to get them solved.

HTH, Thomas

Mebus commented 9 years ago

Hi!

Thank you for your quick reply.

I have

OptionalCmdFlags="-t";

in my configuration.

But I think I messed something up with the username in my /etc/sudoers. I had a "-" in it. And the Unix user did not have a "-".

Sorry for that.

Mebus