Bug 345284 - Network manager asks for 3g sim card pin and administrator password
Summary: Network manager asks for 3g sim card pin and administrator password
Status: RESOLVED NOT A BUG
Alias: None
Product: plasma-nm
Classification: Plasma
Component: general (show other bugs)
Version: 5.3.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-17 22:21 UTC by Con Kolivas
Modified: 2015-06-01 21:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Snapshot of admin password being required (108.62 KB, image/png)
2015-03-17 22:22 UTC, Con Kolivas
Details
Greyed out dialog box (236.59 KB, image/png)
2015-05-13 00:44 UTC, Con Kolivas
Details
Dialog box not greyed out (238.75 KB, image/png)
2015-05-13 00:45 UTC, Con Kolivas
Details
Logging for sequence 2 (63.87 KB, text/plain)
2015-05-13 00:45 UTC, Con Kolivas
Details
Logging for sequence 3 (14.98 KB, text/plain)
2015-05-13 00:46 UTC, Con Kolivas
Details
Journalctl output when refusing to connect (33.49 KB, text/plain)
2015-05-14 22:04 UTC, Con Kolivas
Details
journalctl output when asked for a pin (4.12 KB, text/plain)
2015-05-15 22:40 UTC, Con Kolivas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Con Kolivas 2015-03-17 22:21:01 UTC
My laptop has a in inbuilt mobile broadband which takes 3g/4g sim cards. On kubuntu 14.04 it repeatedly asked for the sim card pin and would not store it even though the sim card required no pin. Now on 14.10 it still will ask for a sim card pin on login, refusing to honour the "store" button for a random pin number, or ignoring it if I select "not required". New on kubuntu 14.10 it now additionally asks for administrator access due to system policy. So my sim card requires no password but instead I have to enter two passwords for it to work. Furthermore on suspend to ram and resume, it never successfully reconnects, showing the connecting symbol over and over again over the system tray applet and failing. Attempting to disconnect and manually connect or create a new profile will still fail to connect - only a full system restart will ever get it to reconnect, thereby requiring the two passwords all over again.

Reproducible: Always

Steps to Reproduce:
1. Create mobile broadband profile selecting "Not required" for pin.
2. Restart system
3. Put in two passwords
4. Suspend to ram
5. Resume

Actual Results:  
Every log in it does not honour the "not required" radio button, nor the "store" button, requring two passwords instead.
On resume from suspend to ram the mobile broadband connection never works.

Expected Results:  
Should not require any passwords after logging into kde environment for mobile broadband to connect, honouring "not required" or "store" radio buttons.
Should be able to resume 3g connection after suspend to ram.
Comment 1 Con Kolivas 2015-03-17 22:22:23 UTC
Created attachment 91608 [details]
Snapshot of admin password being required

Showing the dialog box of additionally requiring administrator password to use mobile broadband connection.
Comment 2 Jan Grulich 2015-03-18 12:05:13 UTC
It could be also a problem in ModemManager which doesn't detect properly whether PIN/PUK is required. Could you try to check what returns this command "qdbus --system org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1/Modem/1 org.freedesktop.ModemManager1.Modem.UnlockRequired"? If that doesn't work try to go with another modem number or check this on dbus directly.

Regarding your issue with asking for a system password, this should be already solved in the next Kubuntu release with Plasma 5.
Comment 3 Con Kolivas 2015-03-23 23:02:15 UTC
Thanks. I tried your command and found it at the following:

sudo qdbus --system org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1/Modem/0 org.freedesktop.ModemManager1.Modem.UnlockRequired                  
1                                                                                                                                                                                    

It seems to think unlock is required.
Comment 4 Jan Grulich 2015-03-24 08:38:04 UTC
Actually it doesn't, because 1 == MM_MODEM_LOCK_NONE. I have no idea why our applet is still asking for PIN unlocking when it's not required. I tried to reproduce it with my modem and it didn't ask for it, so here it seems to work. It should work without any problem when you set pin and password to be not required.
Comment 5 Con Kolivas 2015-03-24 09:51:49 UTC
Okay so... it's been troubling me for 3 releases now, and we don't know what causes it and you can't reproduce it and we don't know how to fix it... so... is there at least a configuration file or files I can try deleting that might be causing confusion?
Comment 6 Jan Grulich 2015-03-24 13:50:50 UTC
Unfortunately there is no configuration which could be causing your problem. Could you try it with Kubuntu 15.04? Just try to boot the live image and see whether the problem happens also there.
Comment 7 Con Kolivas 2015-04-25 10:45:07 UTC
I upgraded to 15.04 today and I... can't even begin to describe what doesn't work on 15.04 for me. I'm not sure if it doesn't like my laptop hardware or something but kde crashes spontaneously every few seconds just sitting idle and the network management settings asked for the 3g password and STILL asked for the administrator password, clicking on the nm systray icon brings up a crash dialog box but can't successfully install debug symbols, if I can get the network management settings pressed it brings up a blank dialog box only to set keyboard shortcuts and... there's so much instability that it's completely unusable. Let's just say that from what I COULD gleam from running 15.04, the same problems still occur as in this bug report.
Comment 8 Jan Grulich 2015-04-25 13:12:20 UTC
The crash has been already reported and fixed, next update should fix it also for you. Regarding the administrator password, that's something I cannot do anything about. If you want to setup your connections, you can also run "kde5-nm-connection-editor", because network management settings is the configuration for the applet, which is currently empty.
Comment 9 Con Kolivas 2015-05-03 22:00:36 UTC
I spotted the network manager update and installed it but I can't try this yet as kdeinit crashes on login and every few seconds while I'm logged into kde as I said so the plasma desktop environment is for the time being completely unusable. I'll keep an eye on updates and report back if/when this gets resolved first.
Comment 10 Con Kolivas 2015-05-09 06:31:16 UTC
Last update fixed my kdeinit crash so I am now able to run the plasma desktop without continual crashes. Unfortunately I -still- get asked for the 3g sim password on login. The bizarre thing is it is not on every login, it seems if I restart it doesn't ask for my login again if it's been a short period (say under an hour of not using my laptop) but the next day it will ask for the password again. If I ignore the dialog box it sometimes just connects the 3g connection anyway before I've typed anything into the sim password box??? Furthermore, the success on suspend to ram/resume usually follows the pattern I've observed previously - on one resume it works instantly, on the next suspend/resume cycle it repeatedly says the connection is disconnected and when I look at the connection list it says it's disabled. A reboot brings it back to life. The only way I can guarantee the mobile broadband will work is a restart. Go figure :(
Comment 11 Jan Grulich 2015-05-12 13:40:28 UTC
Can you please keep running this command:
dbus-monitor --system "sender='org.freedesktop.ModemManager1'"

and while it's running restart ModemManager with "sudo systemctl restart ModemManager.service" and wait until it initializes and shows you the pin dialog. Then send me the output from the first command.
Comment 12 Con Kolivas 2015-05-13 00:43:46 UTC
I'm attaching a number of files to this report. Here is the sequence that goes with them

1. When I had my laptop in a state where it would refuse to even try to connect at all, running that command did nothing and added nothing to the logging.

2. On reboot it brought up the pin dialog
2a. I started that logging command to log.txt and kept it running during all the sequence below:
2b. It accepted a pin and password but did not try to connect. When I brought up the connection editor, connect and disconnect were greyed out in the dialog box. See greyedout.png
2c. I changed a random part of the configuration for that connection (disabled the encryption option), then re-enabled it and then it connected by itself and the disconnect button was no longer greyed out. See notgreyed.png
2d. I suspended to ram and resumed. The connection showed the throbber trying to connect about 5 times but came up with the disconnected message only and then finally stopped trying to connect. The connect button was not greyed out but clicking on it led to a timeout only.
2e. I tried the systemctl command you mentioned but no dialog box ever came up.

3. I rebooted and started your command, logging to log1.txt and did the following:
3a. NO dialog box showed up this time at all and it just connected automatically.
3b. I tried your systemctl command and it disconnected and reconnected, but again no dialog box showed up.
Comment 13 Con Kolivas 2015-05-13 00:44:38 UTC
Created attachment 92567 [details]
Greyed out dialog box
Comment 14 Con Kolivas 2015-05-13 00:45:16 UTC
Created attachment 92568 [details]
Dialog box not greyed out
Comment 15 Con Kolivas 2015-05-13 00:45:59 UTC
Created attachment 92569 [details]
Logging for sequence 2
Comment 16 Con Kolivas 2015-05-13 00:46:39 UTC
Created attachment 92570 [details]
Logging for sequence 3
Comment 17 Jan Grulich 2015-05-14 07:48:36 UTC
That all looks correct. Could you send me output from "journalctl -u ModemManager" once it happens again. Maybe we find something there.
Comment 18 Con Kolivas 2015-05-14 22:04:03 UTC
Created attachment 92602 [details]
Journalctl output when refusing to connect

This is the output from 'journalctl -u ModemManager' when the mobile broadband tries to connect repeatedly on resume from ram and only ever gives a disconnected manager.
Comment 19 Jan Grulich 2015-05-15 12:16:22 UTC
I'd like to see output from 'journalctl -u ModemManager' once it asks for a pin to see whether there is some info about it. The problem you just described is definitely in ModemManager and there is nothing we can do about it. I'm just trying to figure out why it is still asking for a pin.
Comment 20 Con Kolivas 2015-05-15 22:40:08 UTC
Created attachment 92634 [details]
journalctl output when asked for a pin

Network manager asked for a pin and then superuser password. After that it still didn't connect, with connect/disconnect greyed out until I changed some settings for the mobile broadband connection in network manager and changed them back.
Comment 21 Con Kolivas 2015-05-15 22:41:13 UTC
Attached. This also captures what happens if I don't enter pin/password fast enough on login and the connection remains greyed out until I edit the connection details. The two seem related.
Comment 22 Jan Grulich 2015-05-16 05:16:01 UTC
Aha, as you can see, ModemManager thinks that the modem is actually locked:
May 16 08:29:04 s904 ModemManager[657]: <info>  Modem: state changed (unknown -> locked)
May 16 08:29:04 s904 ModemManager[657]: <warn>  couldn't load Operator identifier: 'PinRequired'
May 16 08:29:04 s904 ModemManager[657]: <warn>  couldn't load Operator name: 'PinRequired'

This means that the problem is not on our side and you will have to report this issue in ModemManager bugzilla. Sorry it took too long to find this out.
Comment 23 Con Kolivas 2015-05-27 00:03:46 UTC
Thanks for that. However what about the requirement to edit the connection in the connection editor every single time I unlock it or it remains greyed out?
Comment 24 Jan Grulich 2015-05-27 07:57:24 UTC
It depends on whether the connection is available or not. When NM assumes that the modem is locked, then the connection won't be marked as available. If you edit this connection and leave there a PIN code, it will mark it as available, because it has something to try to unlock it with.
Comment 25 Con Kolivas 2015-05-27 22:18:05 UTC
That's my point, even after I unlock it it's still greyed out. I then have to edit (any) random setting like enabling/disabling ppp echo packets before it will even try to connect. It stays greyed out unless I edit connection editor details in some fashion or create a new connection?
Comment 26 Jan Grulich 2015-06-01 09:30:11 UTC
I'm afraid that I cannot do anything about it. This would need to be fixed on ModemManager/NetworkManager side.
Comment 27 Con Kolivas 2015-06-01 21:21:25 UTC
Thank you so much for taking the time to respond to every query on this extended discussion.