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
You will be prompted to enter your username. Now type in the same command again
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
Now it should connect successfully.
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.
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:
create a file:
/etc/openvpn/pass
(or wherever you want) put the passphrase and in theserver.conf
add, don't forget to secure pass file (sudo chmod 400 pass
)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.
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:
and you get the annoying message:
Now, press CTRL+C to come back to the shell prompt again, go to the fridge, get a beer and run the command again:
and you will see:
(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:
You see again the annoying thing. But just ignore it (and drink). Then, run again your command:
and voilà! you will see now:
Now enter your password and continue drinking, and you will just see the response:
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.