I am running a RedHat Enterprise Linux 7.3 server with NetworkManager 1.4 that needs periodic access over VPN to a client's network using openconnect 7.06-1.el7. I can use nmcli
to connect with the --ask
option without problems, but it obstinately refuses to let me supply a password automatically.
I followed the instructions from a previous question but whether I restart NetworkManager, use nmcli con reload
, or reboot the whole system, it just ignores the [vpn-secrets]
section in the configuration file.
[connection]
id=Client VPN Interface
uuid=9f0d7d19-8bdf-40e1-9fc8-abce32cda118
type=vpn
permissions=
secondaries=
[vpn]
authgroup=Comp
gateway=client.gateway.com
password-flags=0
service-type=org.freedesktop.NetworkManager.openconnect
user-name=myuser
[vpn-secrets]
password=mypass
[ipv4]
dns-search=
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
The error message that I receive is:
A password is required to connect to 'Client VPN Interface'.
Warning: password for 'vpn.secrets.gateway' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
Error: Connection activation failed: no valid VPN secrets.
If I use the same password with --ask
, it works. If I try to supply a passwd-file
, it demands that I also add vpn.secrets.cookie
and vpn.secrets.gwcert
, neither of which I know or need if I use the prompts. If I set cookie-flags=4
and gwcert-flags=4
, it still requires them.
May I please have some help?