Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9696

Are there any usable Linux/Ubuntu recovery methods for WSL?

$
0
0

As a previous StackOverflow question alluded to, is it possible to use any normal recovery tools (live booting from usb, grub command line, etc.) on a WSL program and, if so, how?

For instance, if one accidentally modified sudo permissions and could no longer use sudo without getting the “/etc/sudoers is world writable” error. In this case, how would one revert the /etc/sudoers permissions, since this chmod command itself needs sudo and so normally you would need to do a live boot to change file permissions?

Update: For my own “proof of concept” purposes I initially tried to mount my Windows drive (with WSL) from a completely separate Ubuntu computer to see if I could change the sudoers file permissions from there.

Although it seemed as if I was able to change the permissions from Ubuntu, once I got back into Windows and WSL, the sudoers file showed as corrupted (garbage ls -lah data). I used the information provided by @user1686 in comments and @NotTheDr01ds in an answer to access WSL as root and then create a new sudoers file with correct permissions.


Viewing all articles
Browse latest Browse all 9696

Trending Articles