Bug 403432 - systemd password agent for KDE Plasma
Summary: systemd password agent for KDE Plasma
Status: CONFIRMED
Alias: None
Product: kwalletmanager
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Valentin Rusu
URL: https://www.freedesktop.org/wiki/Soft...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-20 14:31 UTC by Stefan Schmid
Modified: 2024-07-09 19:18 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schmid 2019-01-20 14:31:36 UTC
GNOME has its own Password Agent for systemd, why not KDE?
Comment 1 David Edmundson 2019-01-20 16:09:01 UTC
"why not KDE" is not a suitable reasoning for doing anything.

If you're stating you can't mount a disk in the UI, that is. 
Can you confirm that's the state and what you want fixing?
Comment 2 Stefan Schmid 2019-01-20 16:25:05 UTC
My need:
When I start my OpenVPN connection with "systemctl start openvpn-client @ mgdom" the unit asks for user name and password and systemd uses the Password Agent for it.

But there are other possible applications too. For example, a autofs unit with encryption.
Comment 3 Bug Janitor Service 2019-02-04 04:33:08 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Stefan Schmid 2019-02-04 07:36:03 UTC
(In reply to Bug Janitor Service from comment #3)
I do not understand what is expected of me now. This should be an RFE.

The only thing I can contribute to information is the following link.
https://github.com/oxan/systemd-kde-agent
This is a project that tried to provide a "Password Agent" for KDE 4.
Comment 5 Kai Uwe Broulik 2019-02-04 08:01:05 UTC
Re-opening I guess
Comment 6 Justin Zobel 2020-11-30 01:26:53 UTC
I believe this is fixed. I run systemctl stop ssh in my konsole and it pops up asking me to authenticate. 

If I understand correctly this is what you want?

Can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I've set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 7 Stefan Schmid 2020-11-30 09:17:15 UTC
(In reply to Justin Zobel from comment #6)
> I believe this is fixed. I run systemctl stop ssh in my konsole and it pops
> up asking me to authenticate. 
> 
> If I understand correctly this is what you want?

No, this is a polkit action.
Please have a look at the website which is linked in the field "URL", it explains what it is about.

When a service unit starts (for whatever reason) and the service it contains expects an input, systemd asks for this input via the available Password Agent and then passes it on to the service. Gnome has its own Password Agent integrated in the desktop environment, only KDE Plasma does not have one.
Comment 8 Justin Zobel 2020-11-30 21:47:49 UTC
Moving back to reported.
Comment 9 Stefan Schmid 2020-12-01 09:37:27 UTC
For a better understanding of what is at stake, here is another example:

If a systemd.automount tries to mount something (SMB Share, Encrypted Volume, etc.) that requires a password, the available "Password Agent" will also be used.
However, since KDE Plasma does not offer its own, systemd uses the SYSTEMD-TTY-ASK-PASSWORD-AGENT(1) which only works if a terminal window is open at that moment.
Comment 10 michaelk83 2022-09-06 08:50:15 UTC
From the linked URL, https://www.freedesktop.org/wiki/Software/systemd/PasswordAgents/ :
> You may test this all with manually invoking the "systemd-ask-password" tool on the command line.
> Pass --no-tty to ensure the password is asked via the agent system. Note that only privileged users
> may use this tool.

STEPS TO REPRODUCE
1. In a terminal, run `sudo systemd-ask-password`
2. Run `sudo systemd-ask-password --no-tty`

OBSERVED RESULT
The 1st command asks for a password inside the terminal. The 2nd command hangs until terminated, no prompt is shown.

EXPECTED RESULT
The 2nd command should bring up a GUI password prompt.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon User 20220825-0951 live DVD
KDE Plasma Version: 5.25.4
Qt Version: 5.15.5
SystemD Version: 245.4

ADDITIONAL INFORMATION
Possible workaround (untested): create `.path` systemd unit to watch the `/run/systemd/ask-password` directory, and launch `/usr/bin/pinentry` when that directory becomes non-empty. Side-effect: by default, pinentry will attempt to read the password from Secret Service before asking the user.
https://www.freedesktop.org/software/systemd/man/systemd.path.html