On 26/07/15 05:04, Alan McKay wrote:
> Hi folks,
> 
> I'm on a fresh install of CentOS 7 and take my config that works on
> Ubuntu on the same box.  Instead of getting a prompt for username and
> password for the VPN I get a backgrounded task that spits this out :
> 
> [amckay@centos-gig ~]$ sudo openvpn --config /home/amckay/data/vpn.ovpn 
> --daemon
> 
> Broadcast message from root@centos-gig (Sat 2015-07-25 22:59:13 EDT):
> 
> Password entry required for 'Enter Auth Username:' (PID 23461).
> Please enter password with the systemd-tty-ask-password-agent tool!

Please read that last sentence carefully.

When you start OpenVPN on a system with systemd, things behave slightly
differently and passwords are passed on to OpenVPN *via* systemd.  This is by
design and is to avoid getting stuck with certain stdio/stdout issues.  This
becomes even more visible when you start OpenVPN via service unit files.

So when you see that last line, do this:

  $ sudo systemd-tty-ask-password-agent

And this will query you for the information OpenVPN needs.  Currently the
systemd password agent is rather primitive, and if you need to provide more
inputs you need to do this multiple times.  But OpenVPN have patches ready for
review providing a better API for querying for user input, which will help
further down the road when systemd also enables such a feature.


--
kind regards,

David Sommerseth

------------------------------------------------------------------------------
_______________________________________________
Openvpn-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to