#918624 openvpn: No password prompt under systemd

Package:
openvpn
Source:
openvpn
Description:
virtual private network daemon
Submitter:
Vlastimil Zima
Date:
2023-02-10 16:09:11 UTC
Severity:
important
#918624#5
Date:
2019-01-07 20:14:12 UTC
From:
To:
Dear Maintainer,

I have troubles using openvpn. I use private key protected by password,
but when I start openvpn through systemd:

    sudo systemctl start openvpn@work.service

no password prompt is requested. When I start openvpn directly using

    sudo openvpn --config /etc/openvpn/work.conf

everything works fine.

I'd expect the systemd to ask for password when I start the openvpn
service. It used to work for me before reinstall of computer some time
ago, but I'm not sure which version of openvpn I had.

#918624#10
Date:
2023-02-10 16:07:14 UTC
From:
To:
I have found a workaround for the issue using following commands:

    sudo systemctl start openvpn@work.service && sleep 3 && sudo
systemd-tty-ask-password-agent --query

The sleep is needed to provide enough time for the openvpn to trigger the
password prompt.

VZ