Bug 463744

Summary: Demoting a user to "Standard" does not remove them from group `wheel`
Product: [Applications] systemsettings Reporter: Vagner Lunes <vagnerlunes>
Component: kcm_usersAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: nate, uhhadd
Priority: NOR    
Version First Reported In: 5.26.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Vagner Lunes 2023-01-02 18:47:22 UTC
The "Users" configuration module adds a user to the `wheel` group when making them an Administrator, but fails to remove them from the group afterwards when setting them back to a Standard user.


STEPS TO REPRODUCE
1. (optional) Create a new user to test this with
2. Make this new user an "Administrator" and apply your new setting
3. Make the new user "Standard" again
4. List users within the `wheel` group somehow (such as running `cat /etc/group | grep wheel`)

OBSERVED RESULT
The user continues to be part of the `wheel` group after being set to Standard

EXPECTED RESULT
The user should have been removed from the group as to not have Administration privileges anymore.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Tested on openSUSE Tumbleweed and Arch Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Comment 1 Nate Graham 2023-01-09 19:10:37 UTC
Confirmed, but our code doesn't do this; it seems like it's a regression in AccountsService, which does the heavy lifting for us. Please report it at https://gitlab.freedesktop.org/groups/accountsservice/-/issues. Thanks!