YunoHost-Apps / vpnclient_ynh

VPN Client app for YunoHost
GNU Affero General Public License v3.0
41 stars 25 forks source link

Credentials are not stored, system prompts to manually type user and password on every boot #99

Closed csolisr closed 5 months ago

csolisr commented 2 years ago

Describe the bug

When using the application to configure the server to connect to an OpenVPN server automatically, the credentials are ignored, instead requesting the user to type them manually through the terminal. This defeats the point of storing the credentials, as it requires manual intervention every time the VPN goes down.

Context

Steps to reproduce

Expected behavior

The system should take the credentials and store them for future usage.

Actual behavior

The system ignores the stored credentials and immediately requests the user and password through the terminal:

Broadcast message from root@example.net:
Password entry required for 'Enter Auth Username:' (PID 12345). Please enter password with the systemd-tty-ask-password-agent tool!

So I need to run sudo systemd-tty-ask-password-agent twice, once to enter the user name and again to enter the password.

Logs

Relevant lines from journalctl -u openvpn@client.service:

May 03 19:49:01 example.net openvpn[12345]: Failed to query password: Timer expired
May 03 19:49:01 example.net systemd[1]: openvpn@client.service: start operation timed out. Terminating
May 03 19:49:01 example.net openvpn-client[12345]: ERROR: Failed retrieving username or password
May 03 19:49:01 example.net openvpn-client[12345]: Exiting due to fatal error
May 03 19:49:01 example.net systemd[1]: openvpn@client.service: Main process exited, code=exited, status=1/FAILURE
May 03 19:49:01 example.net systemd[1]: openvpn@client.service: Failed with result 'timeout'.
May 03 19:49:01 example.net systemd[1]: Failed to start OpenVPN connection to client.
May 03 19:49:01 example.net systemd[1]: openvpn@client.service: Scheduled restart job, restart counter is at 1.
csolisr commented 2 years ago

Just found out that the file /etc/openvpn/keys/credentials was somehow not created by the installation tool, nor listed on the /etc/openvpn/client.conf file either.

desmonlabs commented 2 years ago

I'm having the same problem, so VPN Client isn't working because credentials aren't being saved. I tried manually creating the credentials and login file, but it still does not work.

hidrarga commented 5 months ago

I'm closing, but feel free to open the issue again if the problem is still there.