nanobox icon indicating copy to clipboard operation
nanobox copied to clipboard

Entering passwords under WSL doesn't work

Open kristoftorfs opened this issue 7 years ago • 8 comments

When running Nanobox through the Windows Subsystem for Linux, I am (almost) able to start the server. However, when Nanobox tries to mount the codebase I am unable to enter my Windows password. The only thing I can do at that point is Ctrl-C out.

kristof@DESKTOP-94QQ4HB:/mnt/c/Projects/nanobox-symfony-master$ nanobox run php bin/console server:run 0.0.0.0
Administrator privileges are required to start the server.
Another window will be opened as the Administrator and permission may be requested.
Enter to continue:

Starting Nanobox :
  √ Booting VM
  √ Loading kernel modules
  √ Cleaning DHCP
  √ Joining virtual network

Building bridge :
  √ Configuring

Preparing environment :
  * Mounting codebase

krist's password is required to mount a Windows share. (must be your Windows Live password if linked)

kristoftorfs avatar Jun 07 '17 20:06 kristoftorfs

Oo good find. Are you using the Linux version of nanobox or the windows one?

lyondhill avatar Jun 08 '17 21:06 lyondhill

Windows version. Just tried the Linux version, doesn't work either, but I'll open another issue for that.

kristoftorfs avatar Jun 09 '17 05:06 kristoftorfs

with WSL enabled but running nanobox (windows version) in a regular terminal (cmd) does it work?

lyondhill avatar Jun 16 '17 19:06 lyondhill

Yup, then it works, it has something to do with the ReadPassword method in util/display/prompt_unix.go. Unfortunately, my Go skills are not quite good enough to thoroughly troubleshoot :-)

kristoftorfs avatar Jun 16 '17 19:06 kristoftorfs

yah. the trick is read password is quite specific to the operating system its running in thats why the function is defined in https://github.com/nanobox-io/nanobox/blob/master/util/display/prompt_windows.go and in https://github.com/nanobox-io/nanobox/blob/master/util/display/prompt_unix.go it looks like under the unix binary I will have to detect if we are actually running in windows and do some specific code to handle the situation. and visa versa.

lyondhill avatar Jun 16 '17 19:06 lyondhill

We intend to support windows subsystem for linux but we currently don't. Once WSL comes out of beta we will put the time and work into making both the windows version and the linux versions work in the context of WSL. Thanks for your patience.

lyondhill avatar Jun 29 '17 15:06 lyondhill

Is this on the agenda? It appears WSL exited beta some time ago.

ellinokon avatar Nov 29 '17 09:11 ellinokon

I'll reopen this to re-add it to the queue.

glinton avatar Dec 06 '17 17:12 glinton