nullpo-head / WSL-Hello-sudo

Let's sudo by face recognition of Windows Hello on Windows Subsystem for Linux (WSL). It runs on both WSL 1 and WSL 2. This is a PAM module for Linux on WSL.
MIT License
1.22k stars 47 forks source link

sudo whoami prompt never opens Windows Hello #19

Open mbcrump opened 3 years ago

mbcrump commented 3 years ago

I've tried the directions in the README.md for this error but so far no luck.

I always get the password prompt:

mbcrump@DT:/mnt/c/Users/micrum$ sudo id
Password:

My sudo nano /etc/pam.d/sudo:

#%PAM-1.0

auth       sufficient pam_wsl_hello.so
session    required   pam_env.so readenv=1 user_readenv=0
session    required   pam_env.so readenv=1 envfile=/etc/default/locale user_readenv=0@include common-auth
@include common-account
@include common-session-noninteractive

The exe copied over successfully:

mbcrump@DT:/mnt/c/Users/micrum/pam_wsl_hello/WindowsHelloAuthenticator$ tree
.
├── WindowsHelloAuthenticator.exe
├── WindowsHelloAuthenticator.exe.config
└── WindowsHelloAuthenticator.pdb

0 directories, 3 files

Anyone having an issue?

crispinb commented 3 years ago

You might want to check that authenticator_path is correct in /etc/pam_wsl_hello/config. I don't remember the details now, but mine somehow ended up pointing to the wrong place after the install, which resulted in silent failure.

If that's all OK, check out 'Troubleshooting' in the README - I seem to remember I came across the above by trying with su rather than sudo, which gave me some pam error output.

mbcrump commented 3 years ago

thanks for the info. I checked it and it is correct.

mbcrump@DT:/etc/pam_wsl_hello$ cat config
authenticator_path = "/mnt/c/Users/micrum/pam_wsl_hello/WindowsHelloAuthenticator/WindowsHelloAuthenticator.exe"

mbcrump@DT:/etc/pam_wsl_hello$ ls -l /mnt/c/Users/micrum/pam_wsl_hello/W
indowsHelloAuthenticator/WindowsHelloAuthenticator.exe
-rwxrwxrwx 1 mbcrump mbcrump 10240 Mar  2 08:29 /mnt/c/Users/micrum/pam_wsl_hello/WindowsHelloAuthenticator/WindowsHelloAuthenticator.exe

I also tried a few toggles between su and sudo. Nothing yet!