I've just upgraded to 15.10 (and yes I plan to go to 16.04 next time I have a little free time). I've been using openvpn to connect to a work VPN for years and years via a .ovpn config file that's always worked.

Now, however, something having to do with systemd seems to have changed the way things work. When I try to start it, I get a message broadcast out via wall:

Broadcast message from root@turandot (Sun 2016-05-01 10:25:50 CDT):

Password entry required for 'Enter Auth Username:' (PID 17284). Please enter password with the systemd-tty-ask-password-agent tool!

I've googled around for it and found nothing that seems like a solution to the problem. What's the new way to open a VPN connection?


This happens since Ubuntu 15.10 uses systemd to start openvpn. Following seems to work me for me. After you start openvpn and get the error message from the terminal do the following

sudo systemd-tty-ask-password-agent

You will be prompted to enter your username. Now type in the same command again

sudo systemd-tty-ask-password-agent

This time you will be prompted to enter your password. After entering the password start the vpn connection again. For me I do it with the following command

sudo service openvpn start

Now it should connect successfully.

  • Thanks for the answer to how to use systemd-tty-ask-password-agent to enter a password. IT wasn't exactly clear (like mud). This was while looking at the command sudo systemd-ask-password --no-tty "test password" It would have been nice if the sudo was not actually required ("lacking privileges"), to answer a system question. – anthony Apr 30 at 0:53

I know is old but, it may help someone... The way that I did to fix it (unfortunately I don't remember where I got the information) You can do this:

sudo systemctl disable systemd-ask-password-wall.service
sudo systemctl disable systemd-ask-password-wall.path
sudo systemctl stop systemd-ask-password-wall.service
sudo systemctl stop systemd-ask-password-wall.path
sudo systemctl enable systemd-ask-password-console.service
sudo systemctl start systemd-ask-password-console.service

create a file: /etc/openvpn/pass(or wherever you want) put the passphrase and in the server.conf add, don't forget to secure pass file (sudo chmod 400 pass)

askpass pass

Every time on startup, I was asked to "Enter Auth Username" and "Enter Auth Password" and I periodically got the same messages in the terminal as OP did. I can just hit Enter or type in whatever I want, it makes no difference. (Ubuntu 17.10 and 18.04)

So instead of "reinstalling the whole OS", I just commented out the line auth-user-pass in /etc/openvpn/client.conf

Now, the messages both on startup and in the terminal don't bother me anymore.


Problem fixed. After some checks inside the openvpn log I discovered that this problem was generated because the row "auth-user-pass login.txt" doesn't work. Inside the file "login.txt" there was the credential (user and passw). Trying the same configuration file on a different linux machine worked. There as no reason for a different behaviour. Simply reinstalling the whole OS the problem disappear.

  • 2
    "Simply reinstalling the whole OS" – Yonn Trimoreau Mar 22 '20 at 14:49

This is an example showing that a generation of programmers has retired or died and the new generation doesn't have idea on what to do.

I observed the same problem after a while without using OpenVPN to access an University network. Before, it was working ok. I'm running Debian 8 (Jessie). I don't know if the fact of choosing a female character from Toy's Story has anything to do intentionally or not but anyway. This is the way I found it works:

First you run your command:

sudo /etc/init.d/openvpn start

and you get the annoying message:

Broadcast message from root@lenovo (Sun 2019-03-24 19:35:37 EET):

Password entry required for 'Enter Auth Username:' (PID 5516).
Please enter password with the systemd-tty-ask-password-agent tool!

Now, press CTRL+C to come back to the shell prompt again, go to the fridge, get a beer and run the command again:

sudo /etc/init.d/openvpn start

and you will see:

[....] Starting openvpn (via systemctl): openvpn.serviceEnter Auth Username:

(drink). Enter your username to authenticate to your service (e.g. University logon). You will see the asterisks as if your username has to be secret (drink again). And this will be spitted on your terminal:

Broadcast message from root@lenovo (Sun 2019-03-24 19:40:58 EET):

Password entry required for 'Enter Auth Password:' (PID 5716).
Please enter password with the systemd-tty-ask-password-agent tool!

. ok 

You see again the annoying thing. But just ignore it (and drink). Then, run again your command:

sudo /etc/init.d/openvpn start

and voilà! you will see now:

[....] Starting openvpn (via systemctl): openvpn.serviceEnter Auth Password:

Now enter your password and continue drinking, and you will just see the response:

. ok

on your terminal (drink).

That's it. If you open Google and type 'what's my ip' you will see that now you are connected to the private network.

Enjoy your beer!

PS: if in the middle of this crappy process you make some mistake while typing your username or password, the chances are that your terminal hangs up, so just close it and start typing again the commands until you succeed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.