OpenVPN starts and runs just fine when I invoke it directly from the command line, but when I try to start it as a process via systemd, it throws a failure error that I can't find a solution to.
Here's the result of systemctl status [email protected]
("vpnht-128" is the name of my config file):
[email protected] - OpenVPN connection to vpnht-128
Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sal 2015-04-21 15:25:01 EEST; 5h 58min ago
Process: 295 ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i --writepid /run/openvpn@%i.pid (code=exited, status=1/FAILURE)
Apr 21 15:23:31 ben systemd[1]: Starting OpenVPN connection to vpnht-128...
Apr 21 15:23:32 ben openvpn@vpnht-128[295]: OpenVPN 2.3.6 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Dec 2 2014
Apr 21 15:23:32 ben openvpn@vpnht-128[295]: library versions: OpenSSL 1.0.2a 19 Mar 2015, LZO 2.09
Apr 21 15:25:01 ben systemd[1]: [email protected] start operation timed out. Terminating.
Apr 21 15:25:01 ben openvpn@vpnht-128[295]: ERROR: could not not read Auth password from stdin
Apr 21 15:25:01 ben openvpn@vpnht-128[295]: Exiting due to fatal error
Apr 21 15:25:01 ben systemd[1]: [email protected]: control process exited, code=exited status=1
Apr 21 15:25:01 ben systemd[1]: Failed to start OpenVPN connection to vpnht-128.
Apr 21 15:25:01 ben systemd[1]: Unit [email protected] entered failed state.
Apr 21 15:25:01 ben systemd[1]: [email protected] failed.
Here's my OpenVPN config file on GitHub.
All I'm trying to do is automatically pipe in my VPN username and password.
I apologize in advance is there's a resolved thread about this, but I've spent all day scouring various forums and finding no concrete solutions. What am I missing?
auth.dat
and how is openvpn expected to read it?auth.dat
is a file containing my VPN username and password, and it's located in the same directory as the config file. It was a possible solution suggested in one of the threads I read.