WSL/bash-on-windows- sudo broken after release upgrade
up vote
2
down vote
favorite
I know I'm not supposed to run do-release-upgrade
in WSL, but I did it anyway. The upgrade itself went without errors, but any attempt to run sudo returns:
sudo: no tty present and no askpass program specified
The output of ls -l /dev
as a regular user:
ls: cannot access 'lxss': Operation not permitted
ls: random: Invalid argument
ls: tty: Invalid argument
ls: tty0: Invalid argument
total 0
drwxr-xr-x 2 root root 0 Aug 15 19:27 block
lrwxrwxrwx 1 root root 13 Aug 15 19:27 fd -> /proc/self/fd
crw------- 1 root root 0, 0 Aug 15 19:32 kmsg
c????????? ? ? ? ? ? lxss
crw-rw-rw- 1 root root 1, 3 Dec 31 1969 null
crw-rw-rw- 0 root tty 5, 2 Aug 15 19:28 ptmx
drwxr-xr-x 0 root root 0 Aug 15 19:27 pts
crw-rw-rw- 1 root root 1, 8 Aug 15 19:32 random
lrwxrwxrwx 1 root root 8 Aug 15 19:27 shm -> /run/shm
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stdout -> /proc/self/fd/1
crw--w---- 0 me tty 136, 0 Dec 31 1969 tty
crw-rw-rw- 1 root tty 4, 0 Aug 15 2016 tty0
crw------- 1 me tty 4, 1 Aug 15 2016 tty1
crw-rw-rw- 1 root root 1, 9 Aug 15 19:32 urandom
crw-rw-rw- 1 root root 0, 0 Aug 15 19:32 zero
Running as root(using lxrun.exe/setdefaultuser) returns the same thing.
I know I can just reinstall Ubuntu, but I'm still curious as to what might be causing the problem and if there's an easy fix.
Oh- and date
returns Mon Aug 15 19:45:49 DST 2016
, like it should.
windows-10 sudo tty windows-subsystem-for-linux
add a comment |
up vote
2
down vote
favorite
I know I'm not supposed to run do-release-upgrade
in WSL, but I did it anyway. The upgrade itself went without errors, but any attempt to run sudo returns:
sudo: no tty present and no askpass program specified
The output of ls -l /dev
as a regular user:
ls: cannot access 'lxss': Operation not permitted
ls: random: Invalid argument
ls: tty: Invalid argument
ls: tty0: Invalid argument
total 0
drwxr-xr-x 2 root root 0 Aug 15 19:27 block
lrwxrwxrwx 1 root root 13 Aug 15 19:27 fd -> /proc/self/fd
crw------- 1 root root 0, 0 Aug 15 19:32 kmsg
c????????? ? ? ? ? ? lxss
crw-rw-rw- 1 root root 1, 3 Dec 31 1969 null
crw-rw-rw- 0 root tty 5, 2 Aug 15 19:28 ptmx
drwxr-xr-x 0 root root 0 Aug 15 19:27 pts
crw-rw-rw- 1 root root 1, 8 Aug 15 19:32 random
lrwxrwxrwx 1 root root 8 Aug 15 19:27 shm -> /run/shm
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stdout -> /proc/self/fd/1
crw--w---- 0 me tty 136, 0 Dec 31 1969 tty
crw-rw-rw- 1 root tty 4, 0 Aug 15 2016 tty0
crw------- 1 me tty 4, 1 Aug 15 2016 tty1
crw-rw-rw- 1 root root 1, 9 Aug 15 19:32 urandom
crw-rw-rw- 1 root root 0, 0 Aug 15 19:32 zero
Running as root(using lxrun.exe/setdefaultuser) returns the same thing.
I know I can just reinstall Ubuntu, but I'm still curious as to what might be causing the problem and if there's an easy fix.
Oh- and date
returns Mon Aug 15 19:45:49 DST 2016
, like it should.
windows-10 sudo tty windows-subsystem-for-linux
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I know I'm not supposed to run do-release-upgrade
in WSL, but I did it anyway. The upgrade itself went without errors, but any attempt to run sudo returns:
sudo: no tty present and no askpass program specified
The output of ls -l /dev
as a regular user:
ls: cannot access 'lxss': Operation not permitted
ls: random: Invalid argument
ls: tty: Invalid argument
ls: tty0: Invalid argument
total 0
drwxr-xr-x 2 root root 0 Aug 15 19:27 block
lrwxrwxrwx 1 root root 13 Aug 15 19:27 fd -> /proc/self/fd
crw------- 1 root root 0, 0 Aug 15 19:32 kmsg
c????????? ? ? ? ? ? lxss
crw-rw-rw- 1 root root 1, 3 Dec 31 1969 null
crw-rw-rw- 0 root tty 5, 2 Aug 15 19:28 ptmx
drwxr-xr-x 0 root root 0 Aug 15 19:27 pts
crw-rw-rw- 1 root root 1, 8 Aug 15 19:32 random
lrwxrwxrwx 1 root root 8 Aug 15 19:27 shm -> /run/shm
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stdout -> /proc/self/fd/1
crw--w---- 0 me tty 136, 0 Dec 31 1969 tty
crw-rw-rw- 1 root tty 4, 0 Aug 15 2016 tty0
crw------- 1 me tty 4, 1 Aug 15 2016 tty1
crw-rw-rw- 1 root root 1, 9 Aug 15 19:32 urandom
crw-rw-rw- 1 root root 0, 0 Aug 15 19:32 zero
Running as root(using lxrun.exe/setdefaultuser) returns the same thing.
I know I can just reinstall Ubuntu, but I'm still curious as to what might be causing the problem and if there's an easy fix.
Oh- and date
returns Mon Aug 15 19:45:49 DST 2016
, like it should.
windows-10 sudo tty windows-subsystem-for-linux
I know I'm not supposed to run do-release-upgrade
in WSL, but I did it anyway. The upgrade itself went without errors, but any attempt to run sudo returns:
sudo: no tty present and no askpass program specified
The output of ls -l /dev
as a regular user:
ls: cannot access 'lxss': Operation not permitted
ls: random: Invalid argument
ls: tty: Invalid argument
ls: tty0: Invalid argument
total 0
drwxr-xr-x 2 root root 0 Aug 15 19:27 block
lrwxrwxrwx 1 root root 13 Aug 15 19:27 fd -> /proc/self/fd
crw------- 1 root root 0, 0 Aug 15 19:32 kmsg
c????????? ? ? ? ? ? lxss
crw-rw-rw- 1 root root 1, 3 Dec 31 1969 null
crw-rw-rw- 0 root tty 5, 2 Aug 15 19:28 ptmx
drwxr-xr-x 0 root root 0 Aug 15 19:27 pts
crw-rw-rw- 1 root root 1, 8 Aug 15 19:32 random
lrwxrwxrwx 1 root root 8 Aug 15 19:27 shm -> /run/shm
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Aug 15 19:27 stdout -> /proc/self/fd/1
crw--w---- 0 me tty 136, 0 Dec 31 1969 tty
crw-rw-rw- 1 root tty 4, 0 Aug 15 2016 tty0
crw------- 1 me tty 4, 1 Aug 15 2016 tty1
crw-rw-rw- 1 root root 1, 9 Aug 15 19:32 urandom
crw-rw-rw- 1 root root 0, 0 Aug 15 19:32 zero
Running as root(using lxrun.exe/setdefaultuser) returns the same thing.
I know I can just reinstall Ubuntu, but I'm still curious as to what might be causing the problem and if there's an easy fix.
Oh- and date
returns Mon Aug 15 19:45:49 DST 2016
, like it should.
windows-10 sudo tty windows-subsystem-for-linux
windows-10 sudo tty windows-subsystem-for-linux
edited Aug 16 '16 at 15:56
magicandre1981
80.9k20123200
80.9k20123200
asked Aug 16 '16 at 2:42
Anton Liakhovitch
491511
491511
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
2
down vote
accepted
What might help as an alternative to downloading older packages:
- Log in as Root, via
lxrun /setdefaultuser root
, or (if you have not upgraded yet)sudo su
- Set a password for the Root user via
passwd
Now you can always switch to root by simply using su root
and entering the password you have set, without having to toggle the default user via lxrun.
As an alternative, you can prevent sudo from requiring a password at all, as mentioned in several answers here:
To prevent sudo from asking a password at all, you can add the following line at the end of your /etc/sudoers file (use visudo
as root to edit the file)
<username> ALL=(ALL) NOPASSWD: ALL
Be advised, this will cause sudo to no longer ask for a password at all, when executing any Sudo command. If you want to limit the programs that can be used using sudo, add the full path to the binaries (comma separated) instead of the final ALL, eg.:
<username> ALL=(ALL) NOPASSWD: /usr/sbin/cron, /usr/sbin/visudo
Nearly 1 year later: +1, but the above is the best and easiest answer.
– Fabby
Oct 18 '17 at 1:53
Wow. I forgot that I had even asked this. A year later, I'm using OpenSUSE as my main OS with a Windows installation running in KVM for those occasional use cases. However, this answer is what I would've done now had I still been struggling with that problem.
– Anton Liakhovitch
Dec 21 '17 at 4:30
add a comment |
up vote
2
down vote
Found a solution here:
From cmd:
lxrun /setdefaultuser root
From bash as root:
wget http://mirrors.kernel.org/ubuntu/pool/main/s/sudo/sudo_1.8.9p5-1ubuntu1.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/p/procps/procps_3.3.9-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/s/strace/strace_4.8-1ubuntu5_amd64.deb
dpkg -i sudo_1.8.9p5-1ubuntu1.1_amd64.deb
dpkg -i procps_3.3.9-1ubuntu2_amd64.deb
dpkg -i strace_4.8-1ubuntu5_amd64.deb
Don't forget to set your non-root default user after your done!
lxrun /setdefaultuser <your user>
The mirrors listed above don't work for me, but I've found these working: <pre> wget mirror.hmc.edu/ubuntu/pool/main/s/sudo/… wget mirror.hmc.edu/ubuntu/pool/main/s/strace/… </pre> I couldn't downgradeprocps
because of missinglibprocps3
, so I used <pre>mirror.hmc.edu/ubuntu/pool/main/p/procps/…>
– David Lukac
Sep 24 at 13:27
add a comment |
up vote
-1
down vote
From cmd:
ubuntu config --default-user root
To run WSL in the current Windows command prompt
ubuntu.exe
To see the last three users added to the Ubuntu system
tail -3 /etc/passwd
To change the password for user01
passwd user01
To exit WSL
exit
This answer suggests a method that would only work for 1709+, which was released a full year after the question was asked and thus is not applicable to this question.
– Ramhound
Nov 22 at 16:33
My response is addressed to new WSL users first. For now all solution above are already outdated. So I hope my answer will help someone who have more modern build of W10 but have same issue as author of question(with unavailability to run "sudo" and "sudo -s", etc).
– Roman
Nov 28 at 18:56
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
What might help as an alternative to downloading older packages:
- Log in as Root, via
lxrun /setdefaultuser root
, or (if you have not upgraded yet)sudo su
- Set a password for the Root user via
passwd
Now you can always switch to root by simply using su root
and entering the password you have set, without having to toggle the default user via lxrun.
As an alternative, you can prevent sudo from requiring a password at all, as mentioned in several answers here:
To prevent sudo from asking a password at all, you can add the following line at the end of your /etc/sudoers file (use visudo
as root to edit the file)
<username> ALL=(ALL) NOPASSWD: ALL
Be advised, this will cause sudo to no longer ask for a password at all, when executing any Sudo command. If you want to limit the programs that can be used using sudo, add the full path to the binaries (comma separated) instead of the final ALL, eg.:
<username> ALL=(ALL) NOPASSWD: /usr/sbin/cron, /usr/sbin/visudo
Nearly 1 year later: +1, but the above is the best and easiest answer.
– Fabby
Oct 18 '17 at 1:53
Wow. I forgot that I had even asked this. A year later, I'm using OpenSUSE as my main OS with a Windows installation running in KVM for those occasional use cases. However, this answer is what I would've done now had I still been struggling with that problem.
– Anton Liakhovitch
Dec 21 '17 at 4:30
add a comment |
up vote
2
down vote
accepted
What might help as an alternative to downloading older packages:
- Log in as Root, via
lxrun /setdefaultuser root
, or (if you have not upgraded yet)sudo su
- Set a password for the Root user via
passwd
Now you can always switch to root by simply using su root
and entering the password you have set, without having to toggle the default user via lxrun.
As an alternative, you can prevent sudo from requiring a password at all, as mentioned in several answers here:
To prevent sudo from asking a password at all, you can add the following line at the end of your /etc/sudoers file (use visudo
as root to edit the file)
<username> ALL=(ALL) NOPASSWD: ALL
Be advised, this will cause sudo to no longer ask for a password at all, when executing any Sudo command. If you want to limit the programs that can be used using sudo, add the full path to the binaries (comma separated) instead of the final ALL, eg.:
<username> ALL=(ALL) NOPASSWD: /usr/sbin/cron, /usr/sbin/visudo
Nearly 1 year later: +1, but the above is the best and easiest answer.
– Fabby
Oct 18 '17 at 1:53
Wow. I forgot that I had even asked this. A year later, I'm using OpenSUSE as my main OS with a Windows installation running in KVM for those occasional use cases. However, this answer is what I would've done now had I still been struggling with that problem.
– Anton Liakhovitch
Dec 21 '17 at 4:30
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
What might help as an alternative to downloading older packages:
- Log in as Root, via
lxrun /setdefaultuser root
, or (if you have not upgraded yet)sudo su
- Set a password for the Root user via
passwd
Now you can always switch to root by simply using su root
and entering the password you have set, without having to toggle the default user via lxrun.
As an alternative, you can prevent sudo from requiring a password at all, as mentioned in several answers here:
To prevent sudo from asking a password at all, you can add the following line at the end of your /etc/sudoers file (use visudo
as root to edit the file)
<username> ALL=(ALL) NOPASSWD: ALL
Be advised, this will cause sudo to no longer ask for a password at all, when executing any Sudo command. If you want to limit the programs that can be used using sudo, add the full path to the binaries (comma separated) instead of the final ALL, eg.:
<username> ALL=(ALL) NOPASSWD: /usr/sbin/cron, /usr/sbin/visudo
What might help as an alternative to downloading older packages:
- Log in as Root, via
lxrun /setdefaultuser root
, or (if you have not upgraded yet)sudo su
- Set a password for the Root user via
passwd
Now you can always switch to root by simply using su root
and entering the password you have set, without having to toggle the default user via lxrun.
As an alternative, you can prevent sudo from requiring a password at all, as mentioned in several answers here:
To prevent sudo from asking a password at all, you can add the following line at the end of your /etc/sudoers file (use visudo
as root to edit the file)
<username> ALL=(ALL) NOPASSWD: ALL
Be advised, this will cause sudo to no longer ask for a password at all, when executing any Sudo command. If you want to limit the programs that can be used using sudo, add the full path to the binaries (comma separated) instead of the final ALL, eg.:
<username> ALL=(ALL) NOPASSWD: /usr/sbin/cron, /usr/sbin/visudo
edited May 23 '17 at 12:41
Community♦
1
1
answered Nov 2 '16 at 8:35
Leon Hagendijk
361
361
Nearly 1 year later: +1, but the above is the best and easiest answer.
– Fabby
Oct 18 '17 at 1:53
Wow. I forgot that I had even asked this. A year later, I'm using OpenSUSE as my main OS with a Windows installation running in KVM for those occasional use cases. However, this answer is what I would've done now had I still been struggling with that problem.
– Anton Liakhovitch
Dec 21 '17 at 4:30
add a comment |
Nearly 1 year later: +1, but the above is the best and easiest answer.
– Fabby
Oct 18 '17 at 1:53
Wow. I forgot that I had even asked this. A year later, I'm using OpenSUSE as my main OS with a Windows installation running in KVM for those occasional use cases. However, this answer is what I would've done now had I still been struggling with that problem.
– Anton Liakhovitch
Dec 21 '17 at 4:30
Nearly 1 year later: +1, but the above is the best and easiest answer.
– Fabby
Oct 18 '17 at 1:53
Nearly 1 year later: +1, but the above is the best and easiest answer.
– Fabby
Oct 18 '17 at 1:53
Wow. I forgot that I had even asked this. A year later, I'm using OpenSUSE as my main OS with a Windows installation running in KVM for those occasional use cases. However, this answer is what I would've done now had I still been struggling with that problem.
– Anton Liakhovitch
Dec 21 '17 at 4:30
Wow. I forgot that I had even asked this. A year later, I'm using OpenSUSE as my main OS with a Windows installation running in KVM for those occasional use cases. However, this answer is what I would've done now had I still been struggling with that problem.
– Anton Liakhovitch
Dec 21 '17 at 4:30
add a comment |
up vote
2
down vote
Found a solution here:
From cmd:
lxrun /setdefaultuser root
From bash as root:
wget http://mirrors.kernel.org/ubuntu/pool/main/s/sudo/sudo_1.8.9p5-1ubuntu1.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/p/procps/procps_3.3.9-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/s/strace/strace_4.8-1ubuntu5_amd64.deb
dpkg -i sudo_1.8.9p5-1ubuntu1.1_amd64.deb
dpkg -i procps_3.3.9-1ubuntu2_amd64.deb
dpkg -i strace_4.8-1ubuntu5_amd64.deb
Don't forget to set your non-root default user after your done!
lxrun /setdefaultuser <your user>
The mirrors listed above don't work for me, but I've found these working: <pre> wget mirror.hmc.edu/ubuntu/pool/main/s/sudo/… wget mirror.hmc.edu/ubuntu/pool/main/s/strace/… </pre> I couldn't downgradeprocps
because of missinglibprocps3
, so I used <pre>mirror.hmc.edu/ubuntu/pool/main/p/procps/…>
– David Lukac
Sep 24 at 13:27
add a comment |
up vote
2
down vote
Found a solution here:
From cmd:
lxrun /setdefaultuser root
From bash as root:
wget http://mirrors.kernel.org/ubuntu/pool/main/s/sudo/sudo_1.8.9p5-1ubuntu1.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/p/procps/procps_3.3.9-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/s/strace/strace_4.8-1ubuntu5_amd64.deb
dpkg -i sudo_1.8.9p5-1ubuntu1.1_amd64.deb
dpkg -i procps_3.3.9-1ubuntu2_amd64.deb
dpkg -i strace_4.8-1ubuntu5_amd64.deb
Don't forget to set your non-root default user after your done!
lxrun /setdefaultuser <your user>
The mirrors listed above don't work for me, but I've found these working: <pre> wget mirror.hmc.edu/ubuntu/pool/main/s/sudo/… wget mirror.hmc.edu/ubuntu/pool/main/s/strace/… </pre> I couldn't downgradeprocps
because of missinglibprocps3
, so I used <pre>mirror.hmc.edu/ubuntu/pool/main/p/procps/…>
– David Lukac
Sep 24 at 13:27
add a comment |
up vote
2
down vote
up vote
2
down vote
Found a solution here:
From cmd:
lxrun /setdefaultuser root
From bash as root:
wget http://mirrors.kernel.org/ubuntu/pool/main/s/sudo/sudo_1.8.9p5-1ubuntu1.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/p/procps/procps_3.3.9-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/s/strace/strace_4.8-1ubuntu5_amd64.deb
dpkg -i sudo_1.8.9p5-1ubuntu1.1_amd64.deb
dpkg -i procps_3.3.9-1ubuntu2_amd64.deb
dpkg -i strace_4.8-1ubuntu5_amd64.deb
Don't forget to set your non-root default user after your done!
lxrun /setdefaultuser <your user>
Found a solution here:
From cmd:
lxrun /setdefaultuser root
From bash as root:
wget http://mirrors.kernel.org/ubuntu/pool/main/s/sudo/sudo_1.8.9p5-1ubuntu1.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/p/procps/procps_3.3.9-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/s/strace/strace_4.8-1ubuntu5_amd64.deb
dpkg -i sudo_1.8.9p5-1ubuntu1.1_amd64.deb
dpkg -i procps_3.3.9-1ubuntu2_amd64.deb
dpkg -i strace_4.8-1ubuntu5_amd64.deb
Don't forget to set your non-root default user after your done!
lxrun /setdefaultuser <your user>
answered Oct 6 '16 at 20:08
schnatterer
1236
1236
The mirrors listed above don't work for me, but I've found these working: <pre> wget mirror.hmc.edu/ubuntu/pool/main/s/sudo/… wget mirror.hmc.edu/ubuntu/pool/main/s/strace/… </pre> I couldn't downgradeprocps
because of missinglibprocps3
, so I used <pre>mirror.hmc.edu/ubuntu/pool/main/p/procps/…>
– David Lukac
Sep 24 at 13:27
add a comment |
The mirrors listed above don't work for me, but I've found these working: <pre> wget mirror.hmc.edu/ubuntu/pool/main/s/sudo/… wget mirror.hmc.edu/ubuntu/pool/main/s/strace/… </pre> I couldn't downgradeprocps
because of missinglibprocps3
, so I used <pre>mirror.hmc.edu/ubuntu/pool/main/p/procps/…>
– David Lukac
Sep 24 at 13:27
The mirrors listed above don't work for me, but I've found these working: <pre> wget mirror.hmc.edu/ubuntu/pool/main/s/sudo/… wget mirror.hmc.edu/ubuntu/pool/main/s/strace/… </pre> I couldn't downgrade
procps
because of missing libprocps3
, so I used <pre>mirror.hmc.edu/ubuntu/pool/main/p/procps/…>– David Lukac
Sep 24 at 13:27
The mirrors listed above don't work for me, but I've found these working: <pre> wget mirror.hmc.edu/ubuntu/pool/main/s/sudo/… wget mirror.hmc.edu/ubuntu/pool/main/s/strace/… </pre> I couldn't downgrade
procps
because of missing libprocps3
, so I used <pre>mirror.hmc.edu/ubuntu/pool/main/p/procps/…>– David Lukac
Sep 24 at 13:27
add a comment |
up vote
-1
down vote
From cmd:
ubuntu config --default-user root
To run WSL in the current Windows command prompt
ubuntu.exe
To see the last three users added to the Ubuntu system
tail -3 /etc/passwd
To change the password for user01
passwd user01
To exit WSL
exit
This answer suggests a method that would only work for 1709+, which was released a full year after the question was asked and thus is not applicable to this question.
– Ramhound
Nov 22 at 16:33
My response is addressed to new WSL users first. For now all solution above are already outdated. So I hope my answer will help someone who have more modern build of W10 but have same issue as author of question(with unavailability to run "sudo" and "sudo -s", etc).
– Roman
Nov 28 at 18:56
add a comment |
up vote
-1
down vote
From cmd:
ubuntu config --default-user root
To run WSL in the current Windows command prompt
ubuntu.exe
To see the last three users added to the Ubuntu system
tail -3 /etc/passwd
To change the password for user01
passwd user01
To exit WSL
exit
This answer suggests a method that would only work for 1709+, which was released a full year after the question was asked and thus is not applicable to this question.
– Ramhound
Nov 22 at 16:33
My response is addressed to new WSL users first. For now all solution above are already outdated. So I hope my answer will help someone who have more modern build of W10 but have same issue as author of question(with unavailability to run "sudo" and "sudo -s", etc).
– Roman
Nov 28 at 18:56
add a comment |
up vote
-1
down vote
up vote
-1
down vote
From cmd:
ubuntu config --default-user root
To run WSL in the current Windows command prompt
ubuntu.exe
To see the last three users added to the Ubuntu system
tail -3 /etc/passwd
To change the password for user01
passwd user01
To exit WSL
exit
From cmd:
ubuntu config --default-user root
To run WSL in the current Windows command prompt
ubuntu.exe
To see the last three users added to the Ubuntu system
tail -3 /etc/passwd
To change the password for user01
passwd user01
To exit WSL
exit
answered Nov 22 at 16:21
Roman
1
1
This answer suggests a method that would only work for 1709+, which was released a full year after the question was asked and thus is not applicable to this question.
– Ramhound
Nov 22 at 16:33
My response is addressed to new WSL users first. For now all solution above are already outdated. So I hope my answer will help someone who have more modern build of W10 but have same issue as author of question(with unavailability to run "sudo" and "sudo -s", etc).
– Roman
Nov 28 at 18:56
add a comment |
This answer suggests a method that would only work for 1709+, which was released a full year after the question was asked and thus is not applicable to this question.
– Ramhound
Nov 22 at 16:33
My response is addressed to new WSL users first. For now all solution above are already outdated. So I hope my answer will help someone who have more modern build of W10 but have same issue as author of question(with unavailability to run "sudo" and "sudo -s", etc).
– Roman
Nov 28 at 18:56
This answer suggests a method that would only work for 1709+, which was released a full year after the question was asked and thus is not applicable to this question.
– Ramhound
Nov 22 at 16:33
This answer suggests a method that would only work for 1709+, which was released a full year after the question was asked and thus is not applicable to this question.
– Ramhound
Nov 22 at 16:33
My response is addressed to new WSL users first. For now all solution above are already outdated. So I hope my answer will help someone who have more modern build of W10 but have same issue as author of question(with unavailability to run "sudo" and "sudo -s", etc).
– Roman
Nov 28 at 18:56
My response is addressed to new WSL users first. For now all solution above are already outdated. So I hope my answer will help someone who have more modern build of W10 but have same issue as author of question(with unavailability to run "sudo" and "sudo -s", etc).
– Roman
Nov 28 at 18:56
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1113986%2fwsl-bash-on-windows-sudo-broken-after-release-upgrade%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown