Bug 208513 - Can't connect via VPNC, wrong username
Summary: Can't connect via VPNC, wrong username
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: Network Management
Classification: Miscellaneous
Component: VPNC (show other bugs)
Version: 0.9
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Will Stephenson
URL:
Keywords:
: 212073 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-25 16:45 UTC by Dominik Schmidt
Modified: 2011-06-08 03:01 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Schmidt 2009-09-25 16:45:13 UTC
Version:           0.9.svn1023237-123.1 (using Devel)
OS:                Linux
Installed from:    Compiled sources

Hey,

I'm trying to connect to my universities network via vpnc, which works quite well in text mode with vpnc directly or with nm-applet. In knm4 clicking on the vpn-item in the menu nothing happens (only QDBusObjectPath: invalid path "any" in stdout).

Using "qdbus --system --literal  org.freedesktop.NetworkManagerUserSettings /org/freedesktop/NetworkManagerSettings/X org.freedesktop.NetworkManagerSettings.Connection.GetSettings" as suggested on userbase, the only mattering difference I found was, that knetworkmanager sets my vpnc user as "user-name" and nm-applet takes my linux user.

If you want to take a look for yourselves: 
nm-applet output:
 a{sa{sv}} {
  "vpn" = [Argument: a{sv} {
    "service-type" = [Variant(QString): "org.freedesktop.NetworkManager.vpnc"],
    "data" = [Variant: [Argument: a{ss} {
      "IPSec ID" = "vpnoutside",
      "IPSec gateway" = "vpnserver.uni-dortmund.de",
      "NAT Traversal Mode" = "natt",
      "Xauth username" = "sm******"}]],
    "user-name" = [Variant(QString): "domme"],
    "secrets" = [Variant: [Argument: a{ss} {}]]}],
  "connection" = [Argument: a{sv} {
    "id" = [Variant(QString): "UDO nm-applet"],
    "uuid" = [Variant(QString): "1b3d9896-efd7-4b7f-93a9-4e992b0058d8"],
    "type" = [Variant(QString): "vpn"]}]
 }

knm4 output:
 a{sa{sv}} {
  "connection" = [Argument: a{sv} {
    "autoconnect" = [Variant(bool): false],    "type" = [Variant(QString): "vpn"]}],

    "id" = [Variant(QString): "UDO extern"],
    "type" = [Variant(QString): "vpn"],
    "uuid" = [Variant(QString): "9785f4ea-5360-4e14-957e-9f89cc93e6b8"]}],
  "vpn" = [Argument: a{sv} {
    "data" = [Variant: 
      [Argument: a{ss} {
	"IPSec ID" = "vpnoutside",
	"IPSec gateway" = "vpnserver.uni-dortmund.de",
	"Xauth username" = "sm******",
	"ipsec-secret-type" = "save",
	"xauth-password-type" = "save"}]],
    "secrets" = [Variant: [Argument: a{ss} {}]],
    "service-type" = [Variant(QString): "org.freedesktop.NetworkManager.vpnc"],
    "user-name" = [Variant(QString): "sm******"]}]}

After I compared these, I set the NAT traversal mode in knm4 manually (it was default in nm-applet) but it didnt have any effects.

If I set the connection system wide in nm-applet and try to activate it in knm4 routes are added and vpnc is started but knm4 only shows "Activating" state thus I cant disconnect with knm4 and have to use vpnc-disconnect in console.

Hope it helps,
Domme
Comment 1 Dominik Schmidt 2009-09-25 17:27:37 UTC
Maybe this is also helpful: (it's the system wide available connection:
qdbus --system --literal  org.freedesktop.NetworkManagerSystemSettings /org/freedesktop/NetworkManagerSettings/1  org.freedesktop.NetworkManagerSettings.Connection.GetSettings)

a{sa{sv}} {
  "vpn" = [Argument: a{sv} {
    "service-type" = [Variant(QString): "org.freedesktop.NetworkManager.vpnc"],
    "data" = [Variant: [Argument: a{ss} {
      "IPSec ID" = "vpnoutside",
      "IPSec gateway" = "vpnserver.uni-dortmund.de",
      "NAT Traversal Mode" = "natt",
      "Xauth username" = "sm******"}]],
    "secrets" = [Variant: [Argument: a{ss} {}]]}],
    "ipv4" = [Argument: a{sv} {
      "routes" = [Variant: [Argument: aau {}]],
      "addresses" = [Variant: [Argument: aau {}]],
      "method" = [Variant(QString): "auto"],
      "dns" = [Variant: [Argument: au {}]]}],
    "connection" = [Argument: a{sv} {
  "id" = [Variant(QString): "VPN-Verbindung 1"],
  "uuid" = [Variant(QString): "81305fc7-5d11-447e-a035-549c040b1ff5"],
  "type" = [Variant(QString): "vpn"]}]
}
Comment 2 Will Stephenson 2009-09-26 15:27:25 UTC
SVN commit 1028281 by wstephens:

NetworkManager keeps getting weirder.  VPN connections' username is
always the logged in user name.
CCBUG: 208513


 M  +1 -1      libs/internals/schemas/vpn.kcfg  
 M  +3 -2      libs/internals/settings/vpnpersistence.cpp  
 M  +0 -1      vpnplugins/vpnc/vpncwidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1028281
Comment 3 Will Stephenson 2009-09-27 13:16:59 UTC
I've fixed the wrong username bug.  Please test.

I notice that the traversal type  NAT-T is not present in your knetworkmanager dbus output, but is present in the nm-applet output.  However, when I set this traversal type in knetworkmanager, I can see in the dbus output. Could you verify that NAT-T is selected in your connection?
Comment 4 Dominik Schmidt 2009-09-27 23:33:59 UTC
Yes, nat-t was not present when I got the data from dbus but added it after that (showed up in the config and dbus then as well) and didn't want to do the formatting again or insert it manually. Sorry for not making this clear enough :-)

Still no luck with this configuration:
a{sa{sv}}(==connection==
autoconnect: false
id: udo 1028640
type: vpn
uuid: 186eca2c-ad64-4a9b-9e81-c5db69ab25ff
==vpn==
data: a{ss}(IPSec ID: vpnoutside
IPSec gateway: vpnserver.uni-dortmund.de
NAT Traversal Mode: natt
Xauth username: sm******
ipsec-secret-type: save
xauth-password-type: save
)
secrets: a{ss}()
service-type: org.freedesktop.NetworkManager.vpnc
user-name: domme
)

By the way: Shouldn't knm4 show any error message if only logging in fails although the connection is successfully established? You could try to connect to the server with wrong login data and this way test it yourself :-)
Group Password is "hrzvpnclient". If nothing else helps, maybe I could provide you with my login name and password.
Comment 5 Robin Knapp 2009-09-28 12:45:06 UTC
(In reply to comment #2)
> SVN commit 1028281 by wstephens:
> 
> NetworkManager keeps getting weirder.  VPN connections' username is
> always the logged in user name.

So does this mean, one cannot use a different user name than the login name?
I just googled around and found this (in german):
http://www.univie.ac.at/ZID/anleitungen-vpn/ubuntu/

In nm-applet there seems to be an "override username" option, maybe this flag has to be set in the NM connection properties?

Not being able to specify a custom VPN login would be bad
Comment 6 Will Stephenson 2009-09-28 14:24:07 UTC
No, look in the Optional group - you can set your username there.  In a VPNC connection there are 2 user name fields, Xauth username and user-name.  user-name seems to be always set to your system username so i assume it is an implementation detail not exposed to the VPNC service.  Xauth username seems to be the more interesting setting.

The instructions in the URL you googled relate to the old 0.6 NetworkManager version which we don't support.
Comment 7 Robin Knapp 2009-09-28 15:05:56 UTC
thanks for clarification. indeed, xauth is some kind of login method in vpnc - I mixed it up with the Xauthority.
So I guess the user name is just some (random) user id which me be displayed oder logged somewhere, so this doesn't matter.
Comment 8 Will Stephenson 2009-11-17 18:18:25 UTC
*** Bug 212073 has been marked as a duplicate of this bug. ***
Comment 9 Raine 2010-03-07 18:50:25 UTC
Just having the same problem.  I appreciate all the hard work.  If you need additional information please let me know.  Will work around problem for now...
Comment 10 Lamarque V. Souza 2011-05-20 21:09:57 UTC
Is this still happening? I use a VPNC connection in Plasma NM for testing and it works for me.