View previous topic :: View next topic |
Author |
Message |
axelbest n00b


Joined: 30 Dec 2005 Posts: 44 Location: Toronto, Canada
|
Posted: Sun Sep 06, 2020 3:23 pm Post subject: Root required to connect to WiFi |
|
|
Hi, since the last update yesterday, KDE started to show a window from policikit KDE agent asking the root password to connect to WiFi every time the system turns on. How can allow all users to manage and connect to any network? This was not happening before the update.
Thank you in advance |
|
Back to top |
|
 |
alamahant l33t

Joined: 23 Mar 2019 Posts: 801
|
Posted: Sun Sep 06, 2020 6:01 pm Post subject: |
|
|
In
Code: |
/etc/polkit-1/rules.d/50-default.rules
|
maybe add
Code: |
polkit.addAdminRule(function(action, subject) {
return ["unix-group:wheel"];
});
|
Then maybe add your user to the wheel group
Code: |
sudo usermod -aG wheel $USER
|
Please see this
[url]
https://wiki.gentoo.org/wiki/Polkit
[/url]
And run visudo and uncomment the line about "wheel" no passwd.
But maybe this is too many permissions.
Maybe run
pkaction
and try to fine if there is anything related to network or wifi.
Then modify your rules to pertain only to that...
BUT this should have been don by KDE.
Did you miss maybe a dispatch-conf?
 |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 16648
|
Posted: Sun Sep 06, 2020 6:41 pm Post subject: |
|
|
alamahant wrote: | And run visudo and uncomment the line about "wheel" no passwd. | This will allow any user in the wheel group to run commands as root without a password. This is probably excessive for what OP wants, and in my opinion, should come with a warning like the one I wrote. Some people may not want their daily user to have unrestricted root access. |
|
Back to top |
|
 |
axelbest n00b


Joined: 30 Dec 2005 Posts: 44 Location: Toronto, Canada
|
Posted: Tue Sep 08, 2020 4:18 pm Post subject: |
|
|
Hu wrote: | alamahant wrote: | And run visudo and uncomment the line about "wheel" no passwd. | This will allow any user in the wheel group to run commands as root without a password. This is probably excessive for what OP wants, and in my opinion, should come with a warning like the one I wrote. Some people may not want their daily user to have unrestricted root access. |
Agreed, I don't want allow all users to change no more then the network configuration
I tried creating the file /etc/polkit-1/rules.d/10-network.rules but didn't work. Is there any mistake here?
Code: |
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
|
|
|
Back to top |
|
 |
alamahant l33t

Joined: 23 Mar 2019 Posts: 801
|
Posted: Tue Sep 08, 2020 4:37 pm Post subject: |
|
|
Being in the wheel group only means that a user can run
su -
It does not necessarily do this passwordless..
For that you need
user ALL=(ALL) NOPASSWD: ALL
Maybe you should modify your stanza to
Code: |
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" &&
subject.user == "larry") {
return polkit.Result.YES;
}
});
|
Again
this should have been dealt with by your KDE.
I wonder why it wasnt.
Do you have USE="policykit"
in make.conf? |
|
Back to top |
|
 |
asturm Developer


Joined: 05 Apr 2007 Posts: 8116 Location: Austria
|
Posted: Tue Sep 08, 2020 5:53 pm Post subject: |
|
|
Make sure your user has a proper logind session, no polkit hacks. _________________ backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic |
|
Back to top |
|
 |
|