[Solved] Please enter password with the systemd-tty-ask-password-agent tool!

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
marting
OpenVpn Newbie
Posts: 4
Joined: Fri Nov 09, 2018 6:04 pm

[Solved] Please enter password with the systemd-tty-ask-password-agent tool!

Post by marting » Fri Nov 09, 2018 6:58 pm

I've setup PiVPN successfully and can connect from mobile with OpenVPN Connect.

Additionally I've installed another raspi and setting it up as OpenVPN Gateway (client).

Steps I've taken:

Code: Select all

sudo apt-get install openvpn
sudo systemctl enable openvpn
# transferred client.ovpn from PiVPN to raspi
sudo mv client.ovpn /etc/openvpn/client.conf
cd /etc/openvpn
sudo nano auth.txt
# added username and password to auth.txt
sudo chmod 600 /etc/openvpn/auth.txt
sudo nano /etc/openvpn/client.conf
# added "auth-user-pass /etc/openvpn/auth.txt" to client.conf
sudo service openvpn restart
After the restart I'm getting the following message:

Code: Select all

Broadcast message from root@raspberrypi (Fri 2018-11-09 19:47:11 CET):

Password entry required for 'Enter Private Key Password:' (PID 1632).
Please enter password with the systemd-tty-ask-password-agent tool!
Thumb question now: what is my "Private Key Password" (only have OpenVPN Server user and password) ?
... and how to enter it?

marting
OpenVpn Newbie
Posts: 4
Joined: Fri Nov 09, 2018 6:04 pm

Re: Please enter password with the systemd-tty-ask-password-agent tool!

Post by marting » Sun Nov 11, 2018 1:58 pm

I found out, that the "Private Key Password" is THE Password for the OpenVPN User - so simply the same, nothing else - so this question is answered. :!:

... but after a

Code: Select all

sudo service openvpn restart
the message

Code: Select all

Broadcast message from root@raspberrypi (Fri 2018-11-09 19:47:11 CET):

Password entry required for 'Enter Private Key Password:' (PID 1632).
Please enter password with the systemd-tty-ask-password-agent tool!
is always coming up again (similarily if raspi is rebooted - authentication needs to be done manually) - learned that the

Code: Select all

auth-user-pass /etc/openvpn/auth.txt
is no more working :( in the actual
raspian stretch lite
Linux raspberrypi 4.14.71+ #1145 Fri Sep 21 15:06:38 BST 2018 armv6l

so I removed "auth-user-pass" again from /etc/openvpn/client.conf.

... finally: how can the authentication can be automated? :?:

marting
OpenVpn Newbie
Posts: 4
Joined: Fri Nov 09, 2018 6:04 pm

Re: Please enter password with the systemd-tty-ask-password-agent tool!

Post by marting » Sat Nov 17, 2018 1:08 pm

anyone knows how to automate authentication? :(

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Please enter password with the systemd-tty-ask-password-agent tool!

Post by TinCanTech » Sat Nov 17, 2018 1:16 pm

Try --askpass ..

marting
OpenVpn Newbie
Posts: 4
Joined: Fri Nov 09, 2018 6:04 pm

Re: Please enter password with the systemd-tty-ask-password-agent tool!

Post by marting » Sat Nov 17, 2018 8:25 pm

Hi TinCanTech,
thanks for your reply - this seems to be the solution:

using a file ...

Code: Select all

/etc/openvpn/auth.txt
... with a single line with the required password.

Code: Select all

sudo nano /etc/openvpn/auth.txt
... added password, saved with CTRL X

Code: Select all

sudo chmod 600 /etc/openvpn/auth.txt
... and added

Code: Select all

askpass /etc/openvpn/auth.txt
to the client conf file:

Code: Select all

sudo nano /etc/openvpn/yourclient.conf
saved with CTRL X

after a restart of the client with

Code: Select all

sudo service openvpn restart
no more message to use systemd-tty-ask-password-agent and logged in automatically!
:D

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Please enter password with the systemd-tty-ask-password-agent tool!

Post by TinCanTech » Sat Nov 17, 2018 10:35 pm

Thanks for letting us know 8-)

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: [Solved] Please enter password with the systemd-tty-ask-password-agent tool!

Post by TinCanTech » Sat Nov 17, 2018 10:40 pm

By the way .. this probably requires that openvpn is compiled with systemd support.

Post Reply