Network Manager forgets VPN username

Hey there,

When I log in to my computer, I would like to automatically connect to my university’s VPN. This almost works, only thing missing is that Network Manager doesn’t seem to remember my username.

Software in use: openSUSE Tumbleweed, Gnome, Network Manager and the openconnect-vpn plugin for Network Manager
Network connections set up in Network Manager: A Wired Connection and a VPN Connection, I told the Wired Connection to connect automatically and to automatically pull in the VPN Connection as well.

When I try to connect to the VPN the first time, I enter a username and password for the VPN connection in a dialog of the openconnect plugin (nm-openconnect-auth-dialog). Then when I reboot the system, the connection is not re-established and when I hit connect, the dialog comes back up and I see it remembered my password but not my username.

Now here’s what I found out so far:

  • Network Manager created configuration files for the two connections, I posted them below.
  • The VPN password got stored in my GNOME keyring, I can see it there, but it is only the password
  • I found an old VPN connection configuration file on a different account on my computer in which the username was stored. I tried to alter my current VPN connection configuration file so as to remember the username like I saw in that file but that didn’t work: Network Manager removed all lines I manually added. (See below for information on what contents were different)
  • I looked into my GNOME keyring if I could add username information to the VPN password similar as described in https://forum.kde.org/viewtopic.php?f=18&t=121409but Seahorse only let me alter the password, nothing else.

Here are the two connection configuration files that Network Manager created (I x’d out my username and the VPN hostname):

/etc/NetworkManager/system-connections/Wired.nmconnection:

[connection]
id=Wired
uuid=fd0449ea-7d62-441c-a2d7-d176ec772617
type=ethernet
permissions=xxxxxxxxx:;
secondaries=29ed565d-bf5b-45f8-b64d-e832ca4825d7;
timestamp=1556814674

[ethernet]
mac-address=2C:41:38:9B:F4:10
mac-address-blacklist=

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ip6-privacy=0
method=auto

/etc/NetworkManager/system-connections/VPN Connection.nmconnection:

[connection]
id=VPN Connection
uuid=29ed565d-bf5b-45f8-b64d-e832ca4825d7
type=vpn
autoconnect=false
permissions=xxxxxxxxxx;
timestamp=1556814674

[vpn]
authtype=password
autoconnect-flags=0
certsigs-flags=0
cookie-flags=2
enable_csd_trojan=no
gateway=xxxxxxxxxxx
gateway-flags=2
gwcert-flags=2
lasthost-flags=0
pem_passphrase_fsid=no
protocol=anyconnect
stoken_source=disabled
xmlconfig-flags=0
service-type=org.freedesktop.NetworkManager.openconnect

[vpn-secrets]
lasthost=xxxxxxxxxxxx

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

Here’s an excerpt of the configuration file I found on a different account:


[vpn-secrets]
form:main:group_list=SSL
form:main:username=xxxxx
lasthost=xxxxxxxx
save_passwords=yes

The line “form:main:username=xxxxx” looked especially promising, so I copied it into my current VPN connection configuration file (the one posted above), but when I re-connected to the VPN, the line got removed again…

Any suggestions on how I can get Network Manager to remember my username?

Cheers
SUSEbus

I’m not sure what is possible with OpenConnect and NetworkManager authentication, but I did find this old RH bug report on the same topic and assumed from that this was now possible…

https://bugzilla.redhat.com/show_bug.cgi?id=1332491#c3

So, it may be that a bug report is required here.

Hmm, yeah that looks exactly like my problem. I will consider filing a bug report.

However: I got the workaround that I already suggested in the first post working.

First, I added

form:main:group_list=SSL
form:main:username=xxxx
save_passwords=yes

to the vpn-secrets section of the VPN Connection configuration file. This is what I found in the older configuration file on another account. It worked this time because I restarted Network Manager right after the change.

systemctl restart NetworkManager

After that step (and a reboot) the VPN connection connected just fine when I told the Wired Connection to connect.

But I ran into a new problem: The automatic connection upon login still doesn’t work. I used the nmcli command to tell the Wired Connection to retry forever when the automatic connection fails, and now when I log in to my computer I get error messages about twice per second. Yay :smiley:
Among others, the following line appears in my journal for every failed connection attempt:


May 04 00:07:37 linux-qv6y NetworkManager[991]: <error> [1556921257.5159] vpn-connection[0x55caab24e340,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: Failed to request VPN secrets #3: No agents were available for this request.

It looks like the Wired Connection is activated, pulls in the VPN Connection, but the VPN Connection somehow fails to grab the password from the GNOME keyring (I’m guessing on the last part, the keyring guess is also mentioned at https://askubuntu.com/questions/515982/unable-to-connect-to-vpn-using-gnome-network-manager and https://gitlab.gnome.org/GNOME/gnome-shell/issues/123).
When I stop the cartwheel of connection failures and hit “Connect” myself, the Wired Connection and VPN connect just fine without me having to enter anything.

Now does anyone have suggestions or experience with this part of the problem?

You could try using a NetworkManager dispatcher script (triggered when the wired connection is active), and bring the VPN connection up using the nmcli command. A bit clunky but it should work ok. You can then disable the ‘automatically connect’ setting for this connection. FWIW, I’ve seen scripts posted online that run in the background to restart a VPN automatically if it should fail for any reason.

Useful wiki guide:
https://wiki.archlinux.org/index.php/NetworkManager#Network_services_with_NetworkManager_dispatcher

First, I’ll post the whole journal contents of the automatic connection upon login (the one where I told Wired in the Network Manager GUI to automatically pull in VPN):

May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.8822] policy: auto-activating connection 'Wired' (fd0449ea-7d62-441c-a2d7-d176ec772617)
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.8831] device (eno1): Activation: starting connection 'Wired' (fd0449ea-7d62-441c-a2d7-d176ec772617)
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.8833] device (eno1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.8842] manager: NetworkManager state is now CONNECTING
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.8848] device (eno1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.8873] device (eno1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.8885] dhcp4 (eno1): activation: beginning transaction (timeout in 45 seconds)
May 05 12:57:58 linux-qv6y avahi-daemon[966]: Joining mDNS multicast group on interface eno1.IPv6 with address fe80::7cd7:6db3:7f1d:33fb.
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.8916] dhcp4 (eno1): dhclient started with pid 7381
May 05 12:57:58 linux-qv6y avahi-daemon[966]: New relevant interface eno1.IPv6 for mDNS.
May 05 12:57:58 linux-qv6y avahi-daemon[966]: Registering new address record for fe80::7cd7:6db3:7f1d:33fb on eno1.*.
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.9470] dhcp4 (eno1):   address 10.40.144.59
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.9471] dhcp4 (eno1):   plen 22 (255.255.252.0)
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.9471] dhcp4 (eno1):   gateway 10.40.144.1
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.9471] dhcp4 (eno1):   lease time 86400
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.9471] dhcp4 (eno1):   nameserver '139.30.8.7'
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.9471] dhcp4 (eno1):   nameserver '139.30.8.8'
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.9471] dhcp4 (eno1): state changed unknown -> bound
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.9484] device (eno1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.9492] device (eno1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
May 05 12:57:58 linux-qv6y NetworkManager[964]: <info>  [1557053878.9495] policy: set 'Wired' (eno1) as default for IPv4 routing and DNS
May 05 12:57:58 linux-qv6y avahi-daemon[966]: Joining mDNS multicast group on interface eno1.IPv4 with address 10.40.144.59.
May 05 12:57:58 linux-qv6y avahi-daemon[966]: New relevant interface eno1.IPv4 for mDNS.
May 05 12:57:58 linux-qv6y avahi-daemon[966]: Registering new address record for 10.40.144.59 on eno1.IPv4.
May 05 12:57:58 linux-qv6y gsd-sharing[6999]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit rygel.service not loaded.
May 05 12:57:58 linux-qv6y gsd-sharing[6999]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-remote-desktop.service not loaded.
May 05 12:57:58 linux-qv6y gsd-sharing[6999]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit vino-server.service not loaded.
May 05 12:57:59 linux-qv6y NetworkManager[964]: nisdomainname: you must be root to change the domain name
May 05 12:57:59 linux-qv6y gnome-shell[1408]: JS ERROR: TypeError: item is undefined
                                              setActiveConnections/<@resource:///org/gnome/shell/ui/status/network.js:1531:17
                                              setActiveConnections@resource:///org/gnome/shell/ui/status/network.js:1528:9
                                              wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
                                              _syncVpnConnections@resource:///org/gnome/shell/ui/status/network.js:1879:9
                                              wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
May 05 12:57:59 linux-qv6y NetworkManager[964]: <info>  [1557053879.2446] vpn-connection[0x5555a44240d0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: Started the VPN service, PID 7483
May 05 12:57:59 linux-qv6y NetworkManager[964]: <info>  [1557053879.2538] vpn-connection[0x5555a44240d0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: Saw the service appear; activating connection
May 05 12:57:59 linux-qv6y gnome-shell[6432]: Invalid connection type: vpn
May 05 12:57:59 linux-qv6y gnome-shell[6432]: Invalid connection type: vpn
May 05 12:57:59 linux-qv6y NetworkManager[964]: <error> [1557053879.3022] vpn-connection[0x5555a44240d0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: Failed to request VPN secrets #3: No agents were available for this request.
May 05 12:57:59 linux-qv6y NetworkManager[964]: <info>  [1557053879.3025] device (eno1): state change: secondaries -> failed (reason 'secondary-connection-failed', sys-iface-state: 'managed')
May 05 12:57:59 linux-qv6y NetworkManager[964]: <info>  [1557053879.3047] manager: NetworkManager state is now DISCONNECTED
May 05 12:57:59 linux-qv6y NetworkManager[964]: <warn>  [1557053879.3100] device (eno1): Activation: failed for connection 'Wired'
May 05 12:57:59 linux-qv6y NetworkManager[964]: <info>  [1557053879.3142] device (eno1): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
May 05 12:57:59 linux-qv6y avahi-daemon[966]: Withdrawing address record for fe80::7cd7:6db3:7f1d:33fb on eno1.
May 05 12:57:59 linux-qv6y avahi-daemon[966]: Leaving mDNS multicast group on interface eno1.IPv6 with address fe80::7cd7:6db3:7f1d:33fb.
May 05 12:57:59 linux-qv6y avahi-daemon[966]: Interface eno1.IPv6 no longer relevant for mDNS.
May 05 12:57:59 linux-qv6y NetworkManager[964]: <info>  [1557053879.3515] dhcp4 (eno1): canceled DHCP transaction, DHCP client pid 7381
May 05 12:57:59 linux-qv6y NetworkManager[964]: <info>  [1557053879.3516] dhcp4 (eno1): state changed bound -> done
May 05 12:57:59 linux-qv6y avahi-daemon[966]: Withdrawing address record for 10.40.144.59 on eno1.
May 05 12:57:59 linux-qv6y avahi-daemon[966]: Leaving mDNS multicast group on interface eno1.IPv4 with address 10.40.144.59.
May 05 12:57:59 linux-qv6y avahi-daemon[966]: Interface eno1.IPv4 no longer relevant for mDNS.
May 05 12:57:59 linux-qv6y NetworkManager[964]: nisdomainname: you must be root to change the domain name
May 05 12:57:59 linux-qv6y NetworkManager[964]: <info>  [1557053879.6101] vpn-connection[0x5555a44240d0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: VPN plugin: state changed: stopped (6)
May 05 12:57:59 linux-qv6y NetworkManager[964]: <info>  [1557053879.6121] policy: auto-activating connection 'Wired' (fd0449ea-7d62-441c-a2d7-d176ec772617)

It seems to me like NetworkManager and Gnome Keyring aren’t cooperating. Is it possible that Network Manager asks Gnome Keyring for the password as root? That wouldn’t work, or?

/etc/NetworkManager/dispatcher.d/10-connect-vpn.sh:

nmcli connection up "VPN Connection"
-- Logs begin at Sun 2018-10-14 10:08:53 CEST, end at Sun 2019-05-05 12:39:38 CEST. --
May 05 12:39:05 linux-qv6y systemd[1]: NetworkManager-dispatcher.service: Succeeded.
May 05 12:39:19 linux-qv6y NetworkManager[964]: <info>  [1557052759.9162] device (eno1): state change: activated -> deactivating (reason 'user-requested', sys-iface-state: 'managed')
May 05 12:39:19 linux-qv6y NetworkManager[964]: <info>  [1557052759.9169] manager: NetworkManager state is now DISCONNECTING
May 05 12:39:19 linux-qv6y NetworkManager[964]: <info>  [1557052759.9187] audit: op="device-disconnect" interface="eno1" ifindex=2 pid=1836 uid=1000 result="success"
May 05 12:39:19 linux-qv6y NetworkManager[964]: <info>  [1557052759.9189] device (eno1): state change: deactivating -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
May 05 12:39:19 linux-qv6y avahi-daemon[966]: Withdrawing address record for fe80::7cd7:6db3:7f1d:33fb on eno1.
May 05 12:39:19 linux-qv6y avahi-daemon[966]: Leaving mDNS multicast group on interface eno1.IPv6 with address fe80::7cd7:6db3:7f1d:33fb.
May 05 12:39:19 linux-qv6y avahi-daemon[966]: Interface eno1.IPv6 no longer relevant for mDNS.
May 05 12:39:19 linux-qv6y NetworkManager[964]: <info>  [1557052759.9550] dhcp4 (eno1): canceled DHCP transaction, DHCP client pid 4523
May 05 12:39:19 linux-qv6y NetworkManager[964]: <info>  [1557052759.9550] dhcp4 (eno1): state changed bound -> done
May 05 12:39:19 linux-qv6y avahi-daemon[966]: Withdrawing address record for 10.40.144.59 on eno1.
May 05 12:39:19 linux-qv6y avahi-daemon[966]: Leaving mDNS multicast group on interface eno1.IPv4 with address 10.40.144.59.
May 05 12:39:19 linux-qv6y avahi-daemon[966]: Interface eno1.IPv4 no longer relevant for mDNS.
May 05 12:39:20 linux-qv6y NetworkManager[964]: nisdomainname: you must be root to change the domain name
May 05 12:39:20 linux-qv6y NetworkManager[964]: <info>  [1557052760.2348] manager: NetworkManager state is now DISCONNECTED
May 05 12:39:20 linux-qv6y dbus-daemon[960]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.5' (uid=0 pid=964 comm="/usr/sbin/NetworkManager --no-daemon ")
May 05 12:39:20 linux-qv6y gsd-sharing[1987]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit rygel.service not loaded.
May 05 12:39:20 linux-qv6y gsd-sharing[1987]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-remote-desktop.service not loaded.
May 05 12:39:20 linux-qv6y gsd-sharing[1987]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit vino-server.service not loaded.
May 05 12:39:20 linux-qv6y systemd[1]: Starting Network Manager Script Dispatcher Service...
May 05 12:39:20 linux-qv6y dbus-daemon[960]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
May 05 12:39:20 linux-qv6y systemd[1]: Started Network Manager Script Dispatcher Service.
May 05 12:39:20 linux-qv6y nm-dispatcher[4790]: req:1 'down' [eno1]: new request (5 scripts)
May 05 12:39:20 linux-qv6y nm-dispatcher[4790]: req:1 'down' [eno1]: start running ordered scripts...
May 05 12:39:20 linux-qv6y NetworkManager[964]: <info>  [1557052760.2916] agent-manager: req[0x5555a440bf10, :1.159/nmcli-connect/0]: agent registered
May 05 12:39:20 linux-qv6y NetworkManager[964]: <info>  [1557052760.2928] audit: op="connection-activate" uuid="29ed565d-bf5b-45f8-b64d-e832ca4825d7" name="VPN Connection" pid=4794 uid=0 result="fail" reason="Could not find source connection."
May 05 12:39:20 linux-qv6y nm-dispatcher[4790]: Error: Connection activation failed: Could not find source connection.
May 05 12:39:20 linux-qv6y nm-dispatcher[4790]: req:1 'down' [eno1], "/etc/NetworkManager/dispatcher.d/10-connect-vpn.sh": complete: failed with Script '/etc/NetworkManager/dispatcher.d/10-connect-vpn.sh' exited with error status 4.
May 05 12:39:20 linux-qv6y NetworkManager[964]: <warn>  [1557052760.3306] dispatcher: (35) 10-connect-vpn.sh failed (failed): Script '/etc/NetworkManager/dispatcher.d/10-connect-vpn.sh' exited with error status 4.
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8212] device (eno1): Activation: starting connection 'Wired' (fd0449ea-7d62-441c-a2d7-d176ec772617)
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8214] audit: op="connection-activate" uuid="fd0449ea-7d62-441c-a2d7-d176ec772617" name="Wired" pid=1836 uid=1000 result="success"
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8216] device (eno1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8226] manager: NetworkManager state is now CONNECTING
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8238] device (eno1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8251] device (eno1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8263] dhcp4 (eno1): activation: beginning transaction (timeout in 45 seconds)
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8282] dhcp4 (eno1): dhclient started with pid 4818
May 05 12:39:21 linux-qv6y avahi-daemon[966]: Joining mDNS multicast group on interface eno1.IPv6 with address fe80::7cd7:6db3:7f1d:33fb.
May 05 12:39:21 linux-qv6y avahi-daemon[966]: New relevant interface eno1.IPv6 for mDNS.
May 05 12:39:21 linux-qv6y avahi-daemon[966]: Registering new address record for fe80::7cd7:6db3:7f1d:33fb on eno1.*.
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8897] dhcp4 (eno1):   address 10.40.144.59
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8897] dhcp4 (eno1):   plen 22 (255.255.252.0)
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8897] dhcp4 (eno1):   gateway 10.40.144.1
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8897] dhcp4 (eno1):   lease time 86400
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8898] dhcp4 (eno1):   nameserver '139.30.8.7'
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8898] dhcp4 (eno1):   nameserver '139.30.8.8'
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8898] dhcp4 (eno1): state changed unknown -> bound
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8910] device (eno1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8918] device (eno1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8921] device (eno1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8927] manager: NetworkManager state is now CONNECTED_GLOBAL
May 05 12:39:21 linux-qv6y NetworkManager[964]: <info>  [1557052761.8937] policy: set 'Wired' (eno1) as default for IPv4 routing and DNS
May 05 12:39:21 linux-qv6y avahi-daemon[966]: Joining mDNS multicast group on interface eno1.IPv4 with address 10.40.144.59.
May 05 12:39:21 linux-qv6y avahi-daemon[966]: New relevant interface eno1.IPv4 for mDNS.
May 05 12:39:21 linux-qv6y avahi-daemon[966]: Registering new address record for 10.40.144.59 on eno1.IPv4.
May 05 12:39:21 linux-qv6y gsd-sharing[1987]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit rygel.service not loaded.
May 05 12:39:21 linux-qv6y gsd-sharing[1987]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-remote-desktop.service not loaded.
May 05 12:39:21 linux-qv6y gsd-sharing[1987]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit vino-server.service not loaded.
May 05 12:39:22 linux-qv6y NetworkManager[964]: nisdomainname: you must be root to change the domain name
May 05 12:39:22 linux-qv6y NetworkManager[964]: <info>  [1557052762.1766] device (eno1): Activation: successful, device activated.
May 05 12:39:22 linux-qv6y nm-dispatcher[4790]: req:2 'up' [eno1]: new request (5 scripts)
May 05 12:39:22 linux-qv6y nm-dispatcher[4790]: req:2 'up' [eno1]: start running ordered scripts...
May 05 12:39:22 linux-qv6y NetworkManager[964]: <info>  [1557052762.2092] agent-manager: req[0x5555a4423980, :1.160/nmcli-connect/0]: agent registered
May 05 12:39:22 linux-qv6y NetworkManager[964]: <info>  [1557052762.2122] audit: op="connection-activate" uuid="29ed565d-bf5b-45f8-b64d-e832ca4825d7" name="VPN Connection" pid=4919 uid=0 result="success"
May 05 12:39:22 linux-qv6y gnome-shell[1408]: JS ERROR: TypeError: item is undefined
                                              setActiveConnections/<@resource:///org/gnome/shell/ui/status/network.js:1531:17
                                              setActiveConnections@resource:///org/gnome/shell/ui/status/network.js:1528:9
                                              wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
                                              _syncVpnConnections@resource:///org/gnome/shell/ui/status/network.js:1879:9
                                              wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
May 05 12:39:22 linux-qv6y NetworkManager[964]: <info>  [1557052762.2293] vpn-connection[0x5555a44242e0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: Started the VPN service, PID 4925
May 05 12:39:22 linux-qv6y NetworkManager[964]: <info>  [1557052762.2393] vpn-connection[0x5555a44242e0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: Saw the service appear; activating connection
May 05 12:39:22 linux-qv6y nm-dispatcher[4790]: A password is required to connect to 'VPN Connection'.
May 05 12:39:22 linux-qv6y nm-dispatcher[4790]: Warning: password for 'vpn.secrets.gateway' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
May 05 12:39:22 linux-qv6y NetworkManager[964]: <error> [1557052762.2507] vpn-connection[0x5555a44242e0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: Failed to request VPN secrets #3: No agents were available for this request.
May 05 12:39:22 linux-qv6y nm-dispatcher[4790]: Error: Connection activation failed: No valid secrets
May 05 12:39:22 linux-qv6y nm-dispatcher[4790]: Hint: use 'journalctl -xe NM_CONNECTION=29ed565d-bf5b-45f8-b64d-e832ca4825d7 + NM_DEVICE=eno1' to get more details.
May 05 12:39:22 linux-qv6y NetworkManager[964]: <info>  [1557052762.2594] vpn-connection[0x5555a44242e0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: VPN service disappeared
May 05 12:39:22 linux-qv6y nm-dispatcher[4790]: req:2 'up' [eno1], "/etc/NetworkManager/dispatcher.d/10-connect-vpn.sh": complete: failed with Script '/etc/NetworkManager/dispatcher.d/10-connect-vpn.sh' exited with error status 4.
May 05 12:39:22 linux-qv6y NetworkManager[964]: <warn>  [1557052762.4424] dispatcher: (37) 10-connect-vpn.sh failed (failed): Script '/etc/NetworkManager/dispatcher.d/10-connect-vpn.sh' exited with error status 4.
May 05 12:39:28 linux-qv6y NetworkManager[964]: <info>  [1557052768.5161] manager: NetworkManager state is now CONNECTED_SITE
May 05 12:39:28 linux-qv6y NetworkManager[964]: <info>  [1557052768.5514] agent-manager: req[0x5555a43da490, :1.162/nmcli-connect/0]: agent registered
May 05 12:39:28 linux-qv6y nm-dispatcher[4790]: req:3 'connectivity-change': new request (5 scripts)
May 05 12:39:28 linux-qv6y NetworkManager[964]: <info>  [1557052768.5531] audit: op="connection-activate" uuid="29ed565d-bf5b-45f8-b64d-e832ca4825d7" name="VPN Connection" pid=4985 uid=0 result="success"
May 05 12:39:28 linux-qv6y nm-dispatcher[4790]: req:3 'connectivity-change': start running ordered scripts...
May 05 12:39:28 linux-qv6y gnome-shell[1408]: JS ERROR: TypeError: item is undefined
                                              setActiveConnections/<@resource:///org/gnome/shell/ui/status/network.js:1531:17
                                              setActiveConnections@resource:///org/gnome/shell/ui/status/network.js:1528:9
                                              wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
                                              _syncVpnConnections@resource:///org/gnome/shell/ui/status/network.js:1879:9
                                              wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
May 05 12:39:28 linux-qv6y NetworkManager[964]: <info>  [1557052768.5604] vpn-connection[0x5555a44244f0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: Started the VPN service, PID 4990
May 05 12:39:28 linux-qv6y NetworkManager[964]: <info>  [1557052768.5712] vpn-connection[0x5555a44244f0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: Saw the service appear; activating connection
May 05 12:39:28 linux-qv6y nm-dispatcher[4790]: A password is required to connect to 'VPN Connection'.
May 05 12:39:28 linux-qv6y nm-dispatcher[4790]: Warning: password for 'vpn.secrets.gateway' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
May 05 12:39:28 linux-qv6y NetworkManager[964]: <error> [1557052768.5814] vpn-connection[0x5555a44244f0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: Failed to request VPN secrets #3: No agents were available for this request.
May 05 12:39:28 linux-qv6y nm-dispatcher[4790]: Error: Connection activation failed: No valid secrets
May 05 12:39:28 linux-qv6y nm-dispatcher[4790]: Hint: use 'journalctl -xe NM_CONNECTION=29ed565d-bf5b-45f8-b64d-e832ca4825d7 + NM_DEVICE=eno1' to get more details.
May 05 12:39:28 linux-qv6y nm-dispatcher[4790]: req:3 'connectivity-change', "/etc/NetworkManager/dispatcher.d/10-connect-vpn.sh": complete: failed with Script '/etc/NetworkManager/dispatcher.d/10-connect-vpn.sh' exited with error status 4.
May 05 12:39:28 linux-qv6y NetworkManager[964]: <info>  [1557052768.5938] vpn-connection[0x5555a44244f0,29ed565d-bf5b-45f8-b64d-e832ca4825d7,"VPN Connection",0]: VPN plugin: state changed: stopped (6)
May 05 12:39:28 linux-qv6y NetworkManager[964]: <warn>  [1557052768.6149] dispatcher: (38) 10-connect-vpn.sh failed (failed): Script '/etc/NetworkManager/dispatcher.d/10-connect-vpn.sh' exited with error status 4.
May 05 12:39:38 linux-qv6y systemd[1]: NetworkManager-dispatcher.service: Succeeded.

ran out of allowed text in the last reply. That was my dispatcher script and the resulting journal contents when I turn Wired off and back on again. Notice VPN fails twice due to my too simple script: Once upon turning Wired off and once upon turning it back on again.

Problem looks similar to the GUI-set-up automatic activation of VPN. Any ideas here? Does GNOME keyring write any logs where I could look up if Network Manager tried to retrieve the VPN password?