Ξ welcome to cryptostorm's member forums ~ you don't have to be a cryptostorm member to post here Ξ
Ξ any OpenVPN configs found on the forum are likely outdated. For the latest, visit here or GitHub Ξ
Ξ If you're looking for tutorials/guides, check out the new https://cryptostorm.is/#section6 Ξ

Can't create Wireguard keys with Windows Subsystem for Linux

Looking for assistance with a cryptostorm connection issue? Post here & we'll help out. Also: if you're not sure where to post, do so here & we'll move things around as needed. Also: for quickest support, email our oddly calm & easygoing support reps at support@cryptostorm.is :)

Topic Author
DudeOfLondon
Posts: 73
Joined: Sat Jan 10, 2015 5:14 pm

Can't create Wireguard keys with Windows Subsystem for Linux

Post by DudeOfLondon » Tue Oct 29, 2019 6:12 pm

Hi,

I wanted to try out wireguard on Windows and Android. To get my configs I want to use the script that is mentioned in the tutorial.
I, therefore, activated the Windows Subsystem for Linux and installed Ubuntu from the Microsoft store.
I successfully installed the wireguard package into the subsystem. As can be seen on the screenshot (wg bin shows the help text)

But I can't create my key as you can see. But umask works.
How to solve the access denied?
Attachments
wg genkey error WSL2.jpg


Topic Author
DudeOfLondon
Posts: 73
Joined: Sat Jan 10, 2015 5:14 pm

Re: Can't create Wireguard keys with Windows Subsystem for Linux

Post by DudeOfLondon » Tue Oct 29, 2019 9:07 pm

To give others a clue, I solved it like this:
Here you can see that you can change the default user to root with the command

Code: Select all

C:\> ubuntu config --default-user root
from the windows cmd console before you use the linux subsystem.

Remember to change it back to the regular user afterwards ("barebone" in my screenshot).

I think the reason why I can't use the command "su" from the user barebone is that initially there is no password set for the root user. I get the error: "su: authentication failure" And it won't accept the empty password

Found out it is because in Ubuntu on default root is disabled.

Nonetheless, I got it to work with that command mentioned in the beginning.

EDIT: Oh, and I just found out that if su doesn't work I can use "sudo bash" and suddenly I am "root"

Post Reply