Bug 433374 - PolicyKit doesn't show the user whose password it's requesting when there is only one administrator account and you're not using it
Summary: PolicyKit doesn't show the user whose password it's requesting when there is ...
Status: RESOLVED FIXED
Alias: None
Product: policykit-kde-agent-1
Classification: Plasma
Component: general (show other bugs)
Version: 5.21.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-02-21 09:36 UTC by Dan Dascalescu
Modified: 2025-01-15 09:35 UTC (History)
3 users (show)

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


Attachments
Which user is this password for? (50.45 KB, image/png)
2021-02-21 09:36 UTC, Dan Dascalescu
Details
Discover authentication prompt (44.06 KB, image/png)
2021-02-23 00:43 UTC, Dan Dascalescu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Dascalescu 2021-02-21 09:36:26 UTC
Created attachment 136006 [details]
Which user is this password for?

SUMMARY
I was trying to save a file from Kate in a directory in which the user Kate runs as, has no write permissions. At that point, the PolicyKit dialog popped up, asking for root privileges. That was confusing, because
* that user does not have root privileges
* the password PolicyKit was asking for, was the password for my main user, not the one Kate was running as


STEPS TO REPRODUCE
1. Login as user `one`
2. Run Kate as user `two`
3. Save a file in a directory in which user `two` does not have write access
Comment 1 Nate Graham 2021-02-22 21:41:17 UTC
Can't reproduce on openSUSE Tumbleweed in which I get asked for the root password irrespective of how many administrator users there are. I suspect this stuff gets modified by the system policy.

Can you confirm that there are multiple administrator users on the system, not just one? Also, does this happen in Discover too when you install or remove an app or perform updates?
Comment 2 Dan Dascalescu 2021-02-23 00:43:55 UTC
Created attachment 136066 [details]
Discover authentication prompt

There is only one Administrator user, `one`. `two` is 'Standard'.

When I install updates, I still don't see which user PolicyKit1 KDE Agent is asking for a password for. Maybe this is intended, and it didn't bother me, because I know I'm running Discover as the Administrator user, and have only one such user. When the same prompt is triggered from Kate, which is run as the Standard user `two`, I wasn't sure which user's password was demanded.
Comment 3 Nate Graham 2021-02-23 04:18:33 UTC
I see the problem now, thanks.

When you say "Run Kate as user `two`", how are you doing this exactly? And does the problem reproduce if you actually log in as user `two`?
Comment 4 Dan Dascalescu 2021-02-23 10:27:03 UTC
I used the KDE Menu Editor to create a separate entry for Kate, and checked "Run as different user" in the Advanced tab.

If I log in as user `two` and I attempt to save in a directory without write access, I see the same prompt for root privileges. Typing the password for user `one` enables Kate to save the file. This makes me realize this is extra confusing: user `two` does not have root privileges, and may not necessarily know the username of any Administrator user (let alone the password).
Comment 5 Nate Graham 2021-02-23 15:40:07 UTC
Thanks, that makes sense.
Comment 6 Dan Dascalescu 2021-02-24 00:01:24 UTC
That's a very descriptive title :)

Maybe it should just show the username at all times? Might help folks who log in simultaneously into various machines.
Comment 7 mazzafar@yahoo.com 2022-09-22 23:27:28 UTC
I am getting the same issue, can someone please help?
Comment 8 Harald Sitter 2025-01-15 09:35:10 UTC
Seems to be working as expected in 6.3