Update polkit rules to allow sudo users to change wifi config - #196
Open
zytegalaxy wants to merge 1 commit into
Open
Update polkit rules to allow sudo users to change wifi config#196zytegalaxy wants to merge 1 commit into
zytegalaxy wants to merge 1 commit into
Conversation
sassanh
reviewed
Dec 2, 2024
| # exposed via the UI. | ||
|
|
||
| # Add the user to the sudo group | ||
| usermod -aG sudo $USERNAME |
Collaborator
There was a problem hiding this comment.
This script runs for all users, not necessarily the ubo user, when they are created or when their password is being reset in the users menu.
Is this intended?
sassanh
force-pushed
the
main
branch
6 times, most recently
from
February 27, 2025 10:51
436bd97 to
e786876
Compare
sassanh
force-pushed
the
main
branch
3 times, most recently
from
August 28, 2025 13:40
6f85e6d to
052110e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR offers a fix for #183.
For a complete solution, we need to implement #184.
Context: The following system polkit rules is interfering with our custom design polkit rule:
This rule specifically requires users in the sudo group to only modify system settings when they are both
localandactive, and it only covers thesettings.modify.systemaction.Based on the polkit documentation, local and active are attributes of the Subject type that indicate the session status:
local (boolean):
Set to true only if the seat is local
A "local" seat means the user is physically present at the machine (like sitting at a desktop/laptop)
As opposed to a remote connection (like SSH or VNC)
active (boolean):
Set to true only if the session is active
An "active" session means it's currently being used
For example, in a multi-user system with multiple logged-in users, only the currently focused/active user session would be marked as active
If you're logged in but switched to another user's session, your session would be inactive
We need a special rule handling as below: