Keep getting this pop-up requiring me to enter my password when I have Modem Manager GUI open. It happens every 5 mins, as long as Modem Manager is open.
How do i change my system policy to allow the manager.?
Ubuntu 15.04
The message is defined and raised by polkit in the file /usr/share/polkit-1/actions/org.freedesktop.ModemManager1.policy.
Ideal is for the author of Modem Manager GUI to define a polkit policy (see the "Declaring Actions" section in the polkit documentation) that would be shipped in future versions of the application.
Meanwhile, you can add a set of authorization rules in /etc/polkit-1/rules.d/ in a file named something like 30-modem-manager-gui.rules as per the "Authorization Rules" section in the polkit docs I referenced above.
An example rule that checks for the specific message you get and that won't show the message if you are a sudo user:
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.ModemManager1.Device.Control" &&
subject.local && subject.active &&
(subject.isInGroup ("sudo"))) {
return polkit.Result.YES;
}
});
Other users, please help improve this answer with a better example. This is my first stack exchange answer.
Just as a direct alternative to Njenga's answer, you can edit file /usr/share/polkit-1/actions/org.freedesktop.ModemManager1.policy directly. Search for the block that governs the action id "org.freedesktop.ModemManager1.Device.Control":
<action id="org.freedesktop.ModemManager1.Device.Control">
<description>Unlock and control a mobile broadband device</description>
<message>System policy prevents unlocking or controlling the mobile broadband device.</message>
[... other languages skipped...]
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>auth_self_keep</allow_active>
</defaults>
</action>
In the line starting with <allow_active>, replace auth_self_keep with yes. After a reboot, Modem started working without any prompt for me (16.04).