Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37

Thread: Shared connection asks for root password on every reconnect.

  1. #11

    Default Re: Shared connection asks for root password on every reconnect.

    Quote Originally Posted by nrickert View Post
    In my opinion, the KDE folk made a bad decision here. They need to admit their mistake and fix it. At present they are being stubborn.
    Bad decision?
    Sorry, but asking for the root password on connecting/disconnecting is *not* a decision by the KDE develpers.
    There really must be something wrong on the OP's system.

    I use shared connections here since ever (on KDE4 and Plasma5), and it never asks for the root password when trying to connect/disconnect, *only* for changing the settings.
    I'm using 13.2 though, not Leap, but the KDE (and plasma-nm5 in particular) is the same.
    Last edited by wolfi323; 06-Mar-2016 at 07:22.

  2. #12
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,497
    Blog Entries
    3

    Default Re: Shared connection asks for root password on every reconnect.

    Quote Originally Posted by wolfi323 View Post
    Bad decision?
    Sorry, but asking for the root password on connecting/disconnecting is *not* a decision by the KDE develpers.
    There really must be something wrong on the OP's system.
    No, there is nothing wrong with the OP's system. Or, at least, nothing that is involved here.

    The bad decision was to store the network key in kdewallet, instead of having it stored centrally by NetworkManager. Other desktops have it stored centrally. And it works much better.

    For example, if I setup the network connection in Gnome (even a connection for a single user), it still works in KDE (same user). But if I setup the connection in KDE, it doesn't work in Gnome. (You can even test that in your 13.2 system, if you have Gnome or XFCE installed, or even with Icewm running "nm-applet" and a polkit client).

    The workaround for this KDE problem was to set the connection to be shared. But now they have broken even that in Plasma 5.

    I use shared connections here since ever (on KDE4 and Plasma5), and it never asks for the root password when trying to connect/disconnect, *only* for changing the settings.
    I'm using 13.2 though, not Leap, but the KDE (and plasma-nm5 in particular) is the same.
    Yes, that works. They did not screw up as badly with 13.2.

    Are you really using the same "plasma-nm5"? I'm using 5.5.4-6.3 here. I think that was updated late Feb. Before that, using 5.4.3-3.2, the problem did not occur in Leap. And note that "LibKF5NetworkManagerQt6" was also updated recently (about 3 days ago), and perhaps that update is related to the change.

    When you try setting up a shared connection with a fully updated Leap or with NetworkManager, you will run into exactly the same problem (unless it is fixed by then).

    If you have an external drive available, try connecting that to your laptop, and install Tumbleweed or Leap. If Leap, fully update before you set your WiFi connect to shared. Then switch it to shared, and see what happens.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #13

    Default Re: Shared connection asks for root password on every reconnect.

    Quote Originally Posted by nrickert View Post
    The bad decision was to store the network key in kdewallet, instead of having it stored centrally by NetworkManager. Other desktops have it stored centrally. And it works much better.
    For a "shared connection" (formerly known as "system connection" the network key *is* stored centrally (by NetworkManager).

    Only for a *user* connection kwallet is used.
    The old plasmoid-networking did support storing it in plain text in the config file as well, but this option has been removed (for IMHO good reasons).

    Or am I misunderstanding something here?

    Are you really using the same "plasma-nm5"? I'm using 5.5.4-6.3 here.
    Yes.
    Actually I'm on 5.5.5 now though (but when I tried this it was with earlier versions), which will be released as update for Leap as well soon.

    When you try setting up a shared connection with a fully updated Leap or with NetworkManager, you will run into exactly the same problem (unless it is fixed by then).
    I cannot try at the moment because I have no wireless here (using a wired Ethernet connection).
    But I did try in the past, and it worked.
    You need to enter the key in the connection editor though, but IIRC you cannot even click on "OK" unless you do so.

    In any case, if the root password is requested for *connecting*, something is indeed going wrong. (changing the configuration does require the root password in openSUSE's default polkit rules)
    In the end, plasma-nm(5) is just a frontend to NetworkManager. And NetworkManager asks polkit whether the action is allowed. It's polkit then that asks for the root password if necessary (according to its rules).

    Doesn't mean that there might not be a bug in plasma-nm5 though.

    As a first step to investigate, it would be helpful to know what exact polkit rule forces the root password request. This can be seen in the "Details" in the password dialog.

  4. #14
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,497
    Blog Entries
    3

    Default Re: Shared connection asks for root password on every reconnect.

    Quote Originally Posted by wolfi323 View Post
    For a "shared connection" (formerly known as "system connection" the network key *is* stored centrally (by NetworkManager).
    No, sorry, but this is false.

    It was true for opensuse 13.2, and it was true for Leap when released. It was already false for Tumbleweed when I tested this in January (see this blog post dated Jan 16). It is false for Leap after recent updates.

    The current behavior for Leap and Tumbleweed, is that the network key for a system connection is in KDEwallet. When you first login to KDE, you are prompted for the root password (by polkit) for authorization to supply the network key for a shared connection, and you are prompted to open kwallet. I think the root request comes first, though that's from memory. There is a central configuration file in "/etc/NetworkManager/system-connections", but the network key is not being stored there when the shared connection is setup in KDE. The key is still stored centrally (as a line in that configuration file) if the connection is setup in Gnome, XFCE, etc.

    If you had already setup the shared connection before the recent Leap updates, then the key is already stored centrally so you won't run into this problem. If you now make a connection shared with Leap or with Tumbleweed, you will run into exactly this problem.

    Or am I misunderstanding something here?
    Yes. You are basing this on old knowledge. Your previous experience is no longer relevant.

    Actually I'm on 5.5.5 now though (but when I tried this it was with earlier versions), which will be released as update for Leap as well soon.
    I have not tried it with 5.5.5. I suppose I could install "krypton" or "argon" on an external drived connected to my laptop, and test this if you think it important. My suspicion is that it will be the same as I have been seeing in my tests with 5.5.4.

    In any case, if the root password is requested for *connecting*, something is indeed going wrong. (changing the configuration does require the root password in openSUSE's default polkit rules)
    Yes, I agree. It seems to be using the wrong polkit rule. It is using the rule for changing a system connection. But supplying a network key does not change the system connection unless key is saved centrally (in the definition file for the connection). Since the key is only provided for the one-time connection, a different polkit rule should be used.

    So, in my opinion, storing the key locally was a bad decision. But, given that decision, the polkit rule being used is wrong, and that is clearly a bug.

    Doesn't mean that there might not be a bug in plasma-nm5 though.
    This changed recently on Leap. As far as I know, there hasn't been a NetworkManager change, though there is an update waiting for me now. It looks to me as if "plasma-nm5" and "LibKF5NetworkManagerQt6" are the only things that have recently changed that might conceivably be involved.

    I expect that the relevant change in "plasma-nm5" was to retain the key in kwallet, and not ask NetworkManager to store it centrally when making a system connection.

    As a first step to investigate, it would be helpful to know what exact polkit rule forces the root password request. This can be seen in the "Details" in the password dialog.
    I'm pretty sure that it is the rule to change a system connection. But that's from memory. I never wrote that down. To me, the real problem is storing the network key by user (i.e. in kwallet) instead of storing it centrally.

    If you want, I can delete all defined connections, set it up again, then check the "Details" (and write it down this time).
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  5. #15

    Default Re: Shared connection asks for root password on every reconnect.

    Quote Originally Posted by nrickert View Post
    It was true for opensuse 13.2, and it was true for Leap when released. It was already false for Tumbleweed when I tested this in January (see this blog post dated Jan 16). It is false for Leap after recent updates.
    If this really is the case, then it cannot work at all IMHO, and you would be right that the "KDE folks" made a bad decision.
    But as mentioned, I cannot test it at the moment.

    Yes, I agree. It seems to be using the wrong polkit rule. It is using the rule for changing a system connection. But supplying a network key does not change the system connection unless key is saved centrally (in the definition file for the connection). Since the key is only provided for the one-time connection, a different polkit rule should be used.
    Well, it's not plasma-nm's (or the KDE developers') decision which polkit rule is used.
    It's NetworkManager's (or its developers') decision.

    Changing the key for an existing connection is apparently a configuration change.
    And changing the configuration of a "system" connection does need root permissions for a "system" connection. That's defined as such in (openSUSE's) polkit rules.

    I'm pretty sure that it is the rule to change a system connection. But that's from memory. I never wrote that down. To me, the real problem is storing the network key by user (i.e. in kwallet) instead of storing it centrally.
    But requiring the root password for changing a system connection is independent from the place where the password is stored.

    Though as I said, I agree that it would be a bug if the system connection's key would be stored (only) in the user's kwallet by plasma-nm. As this cannot work IMHO.

    At this point, I cannot confirm nor decline this is the case though (it wasn't when I last tried).
    I can only test this next weekend...
    Last edited by wolfi323; 07-Mar-2016 at 08:58.

  6. #16
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,497
    Blog Entries
    3

    Default Re: Shared connection asks for root password on every reconnect.

    Quote Originally Posted by wolfi323 View Post
    If this really is the case, then it cannot work at all IMHO, and you would be right that the "KDE folks" made a bad decision.
    But as mentioned, I cannot test it at the moment.
    I'll look forward to when you are able to test this.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  7. #17
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,497
    Blog Entries
    3

    Default Re: Shared connection asks for root password on every reconnect.

    A further note.

    I have the argon live iso on a USB (original release version). So I booted that in my laptop and setup a network connection. Then I made it a shared connection.

    I then rebooted. On plasma startup, I could see what looked like a polkit window open and close -- it was probably asking for the root password, and closed when it discovered that root did not have a password. I was then prompted for opening kdewallet, after which the network connected.

    Then I looked at the file config file in "/etc/NetworkManager/system-connections". And the network key was not in that file.

    The "plasma-nm5" version appears to be 5.5.90git*.

    Incidentally, I tried "Terminal - Super User Mode" to look at that file. But it opened in ordinary user mode. (It seems to work as expected in standard Leap).
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  8. #18

    Default Re: Shared connection asks for root password on every reconnect.

    Quote Originally Posted by nrickert View Post
    On plasma startup, I could see what looked like a polkit window open and close -- it was probably asking for the root password, and closed when it discovered that root did not have a password. I was then prompted for opening kdewallet, after which the network connected.
    Yeah. Apparently it wanted to have the root password, but as it is empty the dialog just disappeared again.

    Incidentally, I tried "Terminal - Super User Mode" to look at that file. But it opened in ordinary user mode. (It seems to work as expected in standard Leap).
    The unstable konsole package still missed the "Root Shell" profile unlike the stable ones.
    I noticed that and submitted a fix over a week ago:
    https://build.opensuse.org/request/show/361910

    It should be on the latest image, you probably used an older one?
    Last edited by wolfi323; 07-Mar-2016 at 13:01.

  9. #19
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,497
    Blog Entries
    3

    Default Re: Shared connection asks for root password on every reconnect.

    Quote Originally Posted by wolfi323 View Post
    It should be on the latest image, you probably used an older one?
    Yes, this was the original Argon image, and not updated.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  10. #20

    Default Re: Shared connection asks for root password on every reconnect.

    Quote Originally Posted by nrickert View Post
    Yes, this was the original Argon image, and not updated.
    Ok, then at least *this* should be fixed by now.
    If not, we need a rebuild of the Argon image...

    Although, that's off-topic of course.
    Last edited by wolfi323; 07-Mar-2016 at 14:29.

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •