On Wed, 2020-01-08 at 13:33 +0100, Thomas Haller wrote: Hi, Sorry about not setting CC. I hope i have done it right this time
I use sudo to call nmcli because I plan to set a permanent connection to a VPN server from this server I'm in charge of administrating, and this connection must be activated automatically after each booting up or ethernet reconnection. So I expect the final VPN activation command(s) to be run as root. These are versions of installed mentioned packages: NetworkManager 1.18.0-5.el7_7.1 from main repo NetworkManager-pptp 1:1.2.8-1.el7 from epel There is no NetworkManager.gtk nor NetworkManager-pptp-gnome installed here. > On Wed, 2020-01-08 at 12:30 +0330, Babak Razmjoo wrote: > > Hi, > > > Did you intentionally not CC the mailing list? > That's not great, because then nobody else can help you. > Also, the discussion won't be helpful to anybody else. > > > > Well I added a VPN connection named "EnterpriseVPN" using nmcli. > > Now > > when I want to activate this connection using this command: > > > > $ sudo nmcli connection up id "EnterpriseVPN" > > > > The following error appears: > > > > ``` > > (process:32270): libnmc-WARNING **: 03:49:51.232: Failed to spawn > > the > > auth dialogFailed to execute child process “/usr/libexec/nm-pptp- > > auth-dialog” (No such file or directory) > > > > Error: Connection activation failed: No valid secrets > > Where is "/usr/libexec/nm-pptp-auth-dialog"? Seems like the > installation of the plugin is not correct? > > Altough, that's a bit strange, because the profile seems to have > "password-flags=0", which would mean that the secrets are stored > systemwide. What's also strange is that nmcli would even try to > provide > secrets, as you spawn it without `--ask` parameter... Also, why do > you > run nmcli with sudo? > > Some thing are not clear here... > > You say, this is CentOS7. What exact versions of NetworkManager and > NetworkManager-pptp is installed? > > NetworkManager-pptp-gnome is only needed if you use the GTK plugin > for > nm-applet/nm-connection-editor. But if you have it installed, which > version? > > > best, > Thomas > > > ``` > > > > Current connections: > > > > $ nmcli connection > > NAME UUID TYPE > > DEVICE > > ens33 69f35722-42fc-40f9-8dd6- > > 360b96cd1ffb ethernet ens33 > > > > EnterpriseVPN 82a0e4a5-c7f0-42df-bbfb-f38435018a95 vpn > > > > It is contents of /etc/NetworkManager/system- > > connections/EnterpriseVPN : > > > > [connection] > > id=EnterpriseVPN > > uuid=x-y-z > > type=vpn > > interface-name=ppp0 > > permissions= > > zone=public > > autoconnect=false > > > > [vpn] > > service-type=org.freedesktop.NetworkManager.pptp > > user-name=xxxx > > password-flags=0 > > > > [vpn-secrets] > > password=AAAAA&a > > > > [ipv4] > > dns-search= > > method=auto > > > > [ipv6] > > addr-gen-mode=stable-privacy > > dns-search= > > method=auto > > > > On Wed, Jan 8, 2020 at 10:24 AM Babak Razmjoo < > > babak987...@gmail.com> > > wrote: > > > Thanks, I will check it out > > > > > > > > > > > > On Tue, Jan 7, 2020 at 6:06 PM Thomas Haller <thal...@redhat.com> > > > wrote: > > > > On Tue, 2020-01-07 at 16:05 +0330, Babak Razmjoo via > > > > networkmanager- > > > > list wrote: > > > > > I have a CentOS 7 server which is connected to a PPTP VPN > > > > network. > > > > > That means CentOS7 is a PPTP client itself. I need to direct > > > > HTTP > > > > > requests to the PPTP server, but when I click the ppp0 switch > > > > in > > > > > cockpit web panel, or run 'nmcli device connect ppp0', I get > > > > this > > > > > error: > > > > > > > > > > Error: Failed to add/activate new connection: Device class > > > > > NMDevicePpp had no complete_connection method > > > > > > > > Hi, > > > > > > > > > > > > `nmcli device connected` can do one of two things: > > > > > > > > 1) if no suitable profile exists, create one and activate it. > > > > > > > > 2) if a suitable profile exits, activate it. In that case, it's > > > > very > > > > much the same as `nmcli connection up $PROFILE`, except that > > > > NetworkManager will automatically find the profile. > > > > > > > > > > > > VPN profiles aren't handled like regular profiles, and hence > > > > `nmcli > > > > device connect` wouldn't work for it anyway. That probably > > > > should > > > > be > > > > improved. > > > > > > > > > > > > Instead, create/modify the profile to your liking. Start by > > > > looking at > > > > the available profiles with `nmcli connection`. Activate the > > > > right one > > > > with `nmcli connection up`. > > > > > > > > > > > > > > > > > > > > > > > > best, > > > > Thomas > > > > > > > > > > > > > My system specs: > > > > > > > > > > $ uname -a > > > > > Linux localhost.localdomain 3.10.0-1062.9.1.el7.x86_64 #1 SMP > > > > Fri Dec > > > > > 6 15:49:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux > > > > > > > > > > $ ip a > > > > > 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state > > > > UNKNOWN > > > > > group default qlen 1000 > > > > > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > > > > > inet 127.0.0.1/8 scope host lo > > > > > valid_lft forever preferred_lft forever > > > > > 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc > > > > pfifo_fast > > > > > state UP group default qlen 1000 > > > > > link/ether 00:0c:29:2b:ba:88 brd ff:ff:ff:ff:ff:ff > > > > > inet 192.168.100.52/24 brd 192.168.100.255 scope global > > > > > noprefixroute dynamic ens33 > > > > > valid_lft 1632519sec preferred_lft 1632519sec > > > > > 37: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1446 > > > > qdisc > > > > > pfifo_fast state UNKNOWN group default qlen 3 > > > > > link/ppp > > > > > inet 192.168.73.250 peer 192.168.73.1/32 scope global > > > > > ppp0 > > > > > valid_lft forever preferred_lft forever > > > > > > > > > > $ ip route > > > > > default via 192.168.100.102 dev ens33 proto dhcp metric 100 > > > > > 192.168.73.1 dev ppp0 proto kernel scope link src > > > > 192.168.73.250 > > > > > 192.168.100.0/24 dev ens33 proto kernel scope link src > > > > 192.168.100.52 > > > > > metric 100 > > > > > > > > > > $ route > > > > > Kernel IP routing table > > > > > Destination Gateway Genmask Flags Metric > > > > Ref > > > > > Use Iface > > > > > default gateway 0.0.0.0 UG 100 > > > > > 0 > > > > > > > > > 0 ens33 > > > > > 192.168.73.1 0.0.0.0 255.255.255.255 > > > > > UH 0 0 > > > > > > > > > 0 ppp0 > > > > > 192.168.100.0 0.0.0.0 255.255.255.0 U 100 > > > > > 0 > > > > > > > > > 0 ens33 > > > > > _______________________________________________ > > > > > networkmanager-list mailing list > > > > > networkmanager-list@gnome.org > > > > > https://mail.gnome.org/mailman/listinfo/networkmanager-list _______________________________________________ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list