Bug 450122 - In System Settings, cannot delete other users
Summary: In System Settings, cannot delete other users
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_users (show other bugs)
Version: 5.24.0
Platform: Other Linux
: VHI normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-13 05:25 UTC by nyanpasu64
Modified: 2024-08-12 09:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nyanpasu64 2022-02-13 05:25:41 UTC
SUMMARY
When I try to delete another user, and pick "Delete files" or "Keep files", nothing happens.

STEPS TO REPRODUCE
1. Open System Settings to Users.
2. Click another account (in this case, an administrator).
3. Click "Delete User...", and "Delete files" or "Keep files".

OBSERVED RESULT
The user is not deleted.

EXPECTED RESULT
The user is deleted.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.8-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2

ADDITIONAL INFORMATION
Possibly related to Bug 335404. However, that bug says that user deletion fails silently if the other user is logged in. In my case, user deletion fails silently even if I reboot, log into my main account, and delete another account I'm not logged into.
Comment 1 Nicolas Fella 2022-02-13 22:45:59 UTC
Are you getting a Polkit password prompt?
Comment 2 nyanpasu64 2022-02-14 14:34:00 UTC
I do not get a Polkit password prompt. (Note that I have Polkit setup to use a 2FA authenticator dongle or a password. I'm also using systemd login if that's relevant.)

If I run systemsettings5 in a terminal, nothing pops up when I click "Delete files" or "Keep files" (though clicking between pages creates lots of QML warnings). Nothing appears in the journalctl either.

Am I missing a KDE system package?
Comment 3 Nicolas Fella 2022-02-15 12:50:36 UTC
Is polkit-kde-agent installed?

Does running "pkexec ls" produce a password prompt?
Comment 4 nyanpasu64 2022-02-15 12:52:36 UTC
(In reply to Nicolas Fella from comment #3)
> Is polkit-kde-agent installed?

Yes. And opening KWrite and trying to save a file in /dev/ pops up a password prompt.

> Does running "pkexec ls" produce a password prompt?

Yes. If I cancel the prompt I get:

> Error executing command as another user: Not authorized
>
> This incident has been reported.
Comment 5 Nicolas Fella 2022-02-15 14:23:34 UTC
It's the same root cause as https://bugs.kde.org/show_bug.cgi?id=449385

the fix for it is just incomplete
Comment 6 Bug Janitor Service 2022-02-15 14:52:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1461
Comment 7 Nicolas Fella 2022-02-16 12:38:56 UTC
Git commit 79113d99e44ace405bd9211e2c0f73659ff94c0f by Nicolas Fella.
Committed on 16/02/2022 at 12:38.
Pushed by nicolasfella into branch 'master'.

[kcms/user] Set interactive auth flag for more calls

Creating and deleting users needs that too

This also means that we need to be more correct with the types passed into the DBus calls since with passing the args as list we don't get implicit conversion to the correct type any more
FIXED-IN: 5.24.2

M  +12   -3    kcms/users/src/kcm.cpp
M  +1    -1    kcms/users/src/kcm.h

https://invent.kde.org/plasma/plasma-workspace/commit/79113d99e44ace405bd9211e2c0f73659ff94c0f
Comment 8 Nicolas Fella 2022-02-16 12:41:29 UTC
Git commit 2b9ea88c9d3fe7b7530c20e0a6fe1bf70d0accde by Nicolas Fella.
Committed on 16/02/2022 at 12:39.
Pushed by nicolasfella into branch 'Plasma/5.24'.

[kcms/user] Set interactive auth flag for more calls

Creating and deleting users needs that too

This also means that we need to be more correct with the types passed into the DBus calls since with passing the args as list we don't get implicit conversion to the correct type any more
FIXED-IN: 5.24.2
(cherry picked from commit 79113d99e44ace405bd9211e2c0f73659ff94c0f)

M  +12   -3    kcms/users/src/kcm.cpp
M  +1    -1    kcms/users/src/kcm.h

https://invent.kde.org/plasma/plasma-workspace/commit/2b9ea88c9d3fe7b7530c20e0a6fe1bf70d0accde
Comment 9 Bug Janitor Service 2024-07-16 14:54:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4526
Comment 10 David Edmundson 2024-08-12 09:15:30 UTC
Git commit 95d495164bfaee45dde7588aae7fa467b100a4d9 by David Edmundson, on behalf of ivan tkachenko.
Committed on 12/08/2024 at 09:15.
Pushed by davidedmundson into branch 'master'.

kcms/users: Remove workaround for QTBUG-100458

The new API has been shipped in Qt 6.7.0

Effectively reverts 79113d99e44ace405bd9211e2c0f73659ff94c0f and
efddc639b7f1443e643787e841893a5700f07742
Related: bug 449385

M  +4    -11   kcms/users/src/kcm.cpp
M  +18   -25   kcms/users/src/user.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/95d495164bfaee45dde7588aae7fa467b100a4d9