Cannot run sudo command


Recommended Posts

DPyro

I just upgraded windows subsystem for linux to the latest version and now I get this error when using sudo:

sudo: no tty present and no askpass program specified

sudo -S works. How to fix?

Link to post
Share on other sites
Mindovermaster

I think you have to set up sudo for your account.

 

Log in to the system as the root user.

 

Create a normal user account using the useradd command. Replace USERNAME with the user name that you wish to create.


 

# useradd USERNAME

Set a password for the new user using the passwd command.

 

# passwd USERNAME 
Changing password for user USERNAME. 
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

 

Link to post
Share on other sites
Barney T.

What distro are you using. Some distros use su instead of sudo (such as Debian). SU is the command for "superuser".

Link to post
Share on other sites
Mindovermaster

Sudo -S sounds like arch to me. If sudo -S works, it should work without the -S...

Link to post
Share on other sites
Eric

I've never had it require administrator privileges. It defaulted to considering me root. (Since Ubuntu on Windows is technically an app it should have a different instance for each Windows user.)

 

 

Link to post
Share on other sites
DPyro

This is in Microsoft subsystem for linux. It's something to do with tty not working to read the password, hence -s

 

EDIT: Apparently it's a known issues which has been fixed in latest insider build.

https://github.com/Microsoft/BashOnWindows/issues/927

Edited by DPyro
Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.