You are not logged in.

#1 2015-08-24 10:36:55

GreenRaccoon23
Member
Registered: 2014-09-27
Posts: 33

[SOLVED] sudo: no tty present and no askpass program

As I'm reinstalling arch, I'm getting this error after I create my home user:

$ sudo -v
...
sudo: no tty present and no askpass program

I can't use sudo at all under my home user. This is a pretty common problem, but out of the ~30 threads I've found on Google, none of the fixes suggested get rid of this error. I'm using the exact same scripts that I've used to install Arch 10+ times previously, and I've never had this error come up.

The only change I've done to the "/etc/sudoers" file is uncommenting:

%wheel ALL=(ALL) ALL

Uncommenting this instead works:

%wheel ALL=(ALL) NOPASSWD: ALL

But I don't want that for security reasons. "requiretty" is NOT set in "etc/sudoers". I only use `visudo` to edit this file. Also, `visudo` is running with "vim", if that matters:

EDITOR=vim visudo

My root password is set (with `passwd`), and I'm setting up my home user like this:

useradd -m -g users -G wheel,storage,power -s /bin/bash me
passwd me

Like I said, I'm using the same method that's worked many times before, but this time it isn't. I've tried restarting the installation from scratch in case it was just a fluke, but the problem persists. Has there been a change in the way "wheel" works in a recent update of "sudo" or something? Do I need to install another package first? Could it be a problem from the arch iso I'm using? It's the "2015.08.01" image.''

If anyone has any ideas, thanks in advance. smile

Last edited by GreenRaccoon23 (2016-03-23 01:20:24)

Offline

#2 2015-08-24 11:02:50

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,295
Website

Re: [SOLVED] sudo: no tty present and no askpass program

GreenRaccoon23 wrote:

I'm using the exact same scripts that I've used to install Arch 10+ times previously, and I've never had this error come up.

Arch is in a state of constant change; perhaps your script needs updating?

Have you tried a manual install?

You should probably post the content of your sudoers file and the output of `groups`


Para todos todo, para nosotros nada

Offline

#3 2015-08-24 11:04:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] sudo: no tty present and no askpass program

GreenRaccoon23 wrote:

I'm using the exact same scripts that I've used to install Arch 10+ times previously... I'm using the same method that's worked many times before, but this time it isn't

Rather than emphasizing that this unsupported method has worked before, how about you show us what it actually is.  Where are these scripts?  Did you write them or did someone else?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2015-08-25 06:47:50

GreenRaccoon23
Member
Registered: 2014-09-27
Posts: 33

Re: [SOLVED] sudo: no tty present and no askpass program

I figured it out. I couldn't use `sudo` while booting into the Arch flash drive. I booted straight into the new Arch partition and `sudo` worked fine. hmm I'm not sure how that fixed it but it did so I'm not complaining. tongue

Offline

#5 2016-11-06 01:13:39

medicineman25
Member
Registered: 2014-12-03
Posts: 110

Re: [SOLVED] sudo: no tty present and no askpass program

I know. Necrobumping. But this isn't solved and this is the only relevant post about this error message

SOLUTION: log in as root and re-install sudo. You don't need to elevate your user to a no password auth, just re-install sudo after upgrade and all will be well.

Last edited by medicineman25 (2016-11-06 01:14:35)

Offline

#6 2016-11-06 01:25:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] sudo: no tty present and no askpass program

Yes, this was solved.  Unless you somehow got ahold of the same unspecified and unsupported install script that GreenRacoon was using (how would you even know what it was - he never specified) then whatever problem you had has nothing to do with this thread.

CLOSED.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB