Can't change user password on a "System Settings" (polkit dialog doesn't appear)

Bug #1983245 reported by xalt7x
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Systemsettings
Fix Released
High
plasma-workspace (Ubuntu)
Fix Released
High
Unassigned
Jammy
In Progress
High
Unassigned
Kinetic
Fix Released
High
Unassigned
systemsettings (Debian)
New
Unknown

Bug Description

On Kubuntu 22.04 even with "Kubuntu Backports" PPA I can't change password because dialog which asks elevated rights (sudo/root password) doesn't appear

How to reproduce:
1) Go to System Settings > Users
2) Click "Change password" and enter new password

What should happen:
1) After click on button "Set Password" user is asked for administrator password
2) User is notified that it's better to change Kwaller password as well

What currently happens:
1) Dialog closes
2) No warning about KWallet
3) Password doesn't change

If I launch systemsettings with elevated rights
Like
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true systemsettings5 kcm_users
or
sudo systemsettings5 kcm_users
Password changes but KWallet warning doesn't appear

I tried it on a clean "minimal" install inside virtual machine.
I also tried openSUSE Leap 15.4 (which also has KDE Plasma 5.24) and password change works there.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
DistroRelease: Ubuntu 22.04
InstallationDate: Installed on 2022-07-31 (0 days ago)
InstallationMedia: Kubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
Package: systemsettings 4:5.24.4-0ubuntu1
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 5.15.0-43.46-generic 5.15.39
Tags: jammy
Uname: Linux 5.15.0-43-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True

xalt7x (xalt7x)
description: updated
description: updated
Revision history for this message
lotuspsychje (lotuspsychje) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:
apport-collect 1983245

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
xalt7x (xalt7x) wrote : Dependencies.txt

apport information

tags: added: apport-collected jammy
description: updated
Revision history for this message
xalt7x (xalt7x) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
xalt7x (xalt7x) wrote : ProcEnviron.txt

apport information

Revision history for this message
xalt7x (xalt7x) wrote (last edit ): Re: Can't change password (polkit dialog is not triggered)

So just to make sure I've tried VM with a "normal" installation of Kubuntu 22.04 and English locale.
Now it's safe to say that this bug is 100% reproducible.
I tested other Debian-based distros:
- Kubuntu 22.10/kinetic daily build (2022-08-06) - broken
- Debian Testing (weekly build from 2022-08-01) - broken
- KDE Neon (build from 2022-08-04, based on 20.04) - works
- Debian 11.4 - works.
Debian 11 with latest KDE packages (Norbert Preining backports) - still works

summary: - Can't change password (polkit dialog is not triggered)
+ Can't change user password on a "System Settings" (polkit dialog is not
+ triggered)
tags: added: kinetic
xalt7x (xalt7x)
summary: - Can't change user password on a "System Settings" (polkit dialog is not
- triggered)
+ Can't change user password on a "System Settings" (polkit dialog doesn't
+ appear)
Changed in systemsettings (Debian):
status: Unknown → New
Revision history for this message
In , Jjhesrbhf (jjhesrbhf) wrote :

SUMMARY
***
I'm unable to change the current user's password using KDE users settings. When I press Set Password button - nothing is changed.
***

STEPS TO REPRODUCE
1. Open Users settings
2. Press Change Password
3. Input the new password and the confirmation
4. Press Set Password

OBSERVED RESULT
Nothing is changed. I can login using my old password

EXPECTED RESULT
I can login using the new password

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.19.9-arch1-1 (x64)
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION

Revision history for this message
In , G-kde (g-kde) wrote :

Your password may be too short, try to change it to the one you tried on the terminal with passwd
See my report https://bugs.kde.org/show_bug.cgi?id=459430

Revision history for this message
In , Jjhesrbhf (jjhesrbhf) wrote :

(In reply to Marc Guhr from comment #1)
> Your password may be too short, try to change it to the one you tried on the
> terminal with passwd
> See my report https://bugs.kde.org/show_bug.cgi?id=459430

Just tried the following:
1. Changed password using passwd
2. Tried to set it back using UI
3. Set it back using passwd

Still nothing is changed from UI settings but works with passwd. So it doesn't seem to be related to the password length

Revision history for this message
In , Nate-b (nate-b) wrote :

Can you run `systemsettings kcm_users` in a terminal window?

Then clear the scrollback with Ctrl+Shift+K.

Then change the password.

After that, please paste any new output in the terminal window into a comment here. Thanks!

Revision history for this message
In , Jjhesrbhf (jjhesrbhf) wrote :

(In reply to Nate Graham from comment #3)
> Can you run `systemsettings kcm_users` in a terminal window?
>
> Then clear the scrollback with Ctrl+Shift+K.
>
> Then change the password.
>
> After that, please paste any new output in the terminal window into a
> comment here. Thanks!

No new output appeared. But I noticed the following error on first run, maybe it will help.

file:///usr/share/kpackage/kcms/kcm_users/contents/ui/UserDetailsPage.qml:345: ReferenceError: modelData is not defined
QFSFileEngine::open: No file name specified
kf.coreaddons.desktopparser: Error: Failed to open ""
QFileDevice::seek: IODevice is not open

Revision history for this message
In , Nate-b (nate-b) wrote :

Darn. Thanks anyway.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemsettings (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Rik Mills (rikmills) wrote :
Revision history for this message
In , Rik Mills (rikmills) wrote :

Also confirmed on fresh install of the KDE Neon 22.04 preview

Changed in systemsettings:
importance: Unknown → Low
Revision history for this message
In , Nate-b (nate-b) wrote :

I wonder if an accountsservice regression might have caused this? I have version 0.6.55 in Fedora. What versions are affected folks using?

Revision history for this message
In , Rik Mills (rikmills) wrote : Re: [Bug 1983245]

On 26/09/2022 17:47, Nate-b wrote:
> I wonder if an accountsservice regression might have caused this? I have
> version 0.6.55 in Fedora. What versions are affected folks using?

https://packages.ubuntu.com/jammy-updates/accountsservice

https://changelogs.ubuntu.com/changelogs/pool/main/a/accountsservice/accountsservice_22.07.5-2ubuntu1.3/changelog

Revision history for this message
In , Rik Mills (rikmills) wrote :

(In reply to Nate Graham from comment #8)
> I wonder if an accountsservice regression might have caused this? I have
> version 0.6.55 in Fedora. What versions are affected folks using?

22.07.5 it seems.

https://packages.ubuntu.com/jammy-updates/accountsservice

Downgrading accountsservice and libaccountsservice0 in the Neon Jammy 22.04 preview to the 0.6.55 from Focal, does seem to fix the issue.

Revision history for this message
Rik Mills (rikmills) wrote :

Downgrading accountservice packages to the versions from Focal does seem to make things work

Revision history for this message
In , Rik Mills (rikmills) wrote :

(In reply to Rik Mills from comment #9)
> Downgrading accountsservice and libaccountsservice0 in the Neon Jammy 22.04
> preview to the 0.6.55 from Focal, does seem to fix the issue.

So does doing the same on Kubuntu 22.04

Revision history for this message
In , Nate-b (nate-b) wrote :

So it looks like there are two options here:
1. It was an unintentional regression in accountsservice that needs to be fixed
2. It was an intentional change in accountsservice (perhaps we were using the API wrong, or using deprecated API) and we need to adapt to it

Someone with accountsservice experience will need to investigate or bisect it.

Changed in systemsettings:
importance: Low → High
Revision history for this message
In , Marco Martin (notmart) wrote :

It seems that when you try to change the password polkit doesn't ask for authentication and doesn't do anything.

if you do something else before, like changing the real name, it authenticates, and from now on, changing the password will work.

Revision history for this message
In , Bug-janitor (bug-janitor) wrote :

A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2175

Revision history for this message
In , Marco Martin (notmart) wrote :

Git commit 48ccb433ca79e94ef705734d9cab599f01df97e8 by Marco Martin.
Committed on 28/09/2022 at 09:33.
Pushed by mart into branch 'master'.

set setInteractiveAuthorizationAllowed on SetPassword call

is important that the setpasswod call uses interactive authorization,
otherwise will be denied, unless the user had been modified beforehand
so an authorization was already granted

M +8 -3 kcms/users/src/user.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/48ccb433ca79e94ef705734d9cab599f01df97e8

Revision history for this message
In , Marco Martin (notmart) wrote :

Git commit 84dcfc45b9a354827b9bbf6ae58902d04e8fe915 by Marco Martin.
Committed on 28/09/2022 at 09:51.
Pushed by mart into branch 'Plasma/5.25'.

set setInteractiveAuthorizationAllowed on SetPassword call

is important that the setpasswod call uses interactive authorization,
otherwise will be denied, unless the user had been modified beforehand
so an authorization was already granted

M +8 -3 kcms/users/src/user.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/84dcfc45b9a354827b9bbf6ae58902d04e8fe915

Revision history for this message
In , Marco Martin (notmart) wrote :

Git commit 9043786def19940129c341a7c550aebe7406c6f5 by Marco Martin.
Committed on 28/09/2022 at 09:50.
Pushed by mart into branch 'Plasma/5.26'.

set setInteractiveAuthorizationAllowed on SetPassword call

is important that the setpasswod call uses interactive authorization,
otherwise will be denied, unless the user had been modified beforehand
so an authorization was already granted

M +8 -3 kcms/users/src/user.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/9043786def19940129c341a7c550aebe7406c6f5

Rik Mills (rikmills)
Changed in plasma-workspace (Ubuntu Kinetic):
status: New → Confirmed
Changed in plasma-workspace (Ubuntu Jammy):
status: New → Confirmed
no longer affects: systemsettings (Ubuntu Jammy)
no longer affects: systemsettings (Ubuntu Kinetic)
Changed in plasma-workspace (Ubuntu Jammy):
importance: Undecided → High
Changed in plasma-workspace (Ubuntu Kinetic):
importance: Undecided → High
assignee: nobody → Rik Mills (rikmills)
Changed in plasma-workspace (Ubuntu Jammy):
assignee: nobody → Rik Mills (rikmills)
Changed in systemsettings:
status: Unknown → Fix Released
Rik Mills (rikmills)
Changed in plasma-workspace (Ubuntu Kinetic):
status: Confirmed → Fix Committed
Changed in plasma-workspace (Ubuntu Jammy):
status: Confirmed → In Progress
Revision history for this message
Rik Mills (rikmills) wrote :

Note: the KCM in question is shipping in the plasma-workspace package, so changing the launchpad bug to that.

no longer affects: systemsettings (Ubuntu)
Revision history for this message
In , Nate-b (nate-b) wrote :

Git commit b66f8019a3db00aa1e4e1c54d19f55c9cbff4d12 by Nate Graham, on behalf of Marco Martin.
Committed on 28/09/2022 at 13:57.
Pushed by ngraham into branch 'Plasma/5.24'.

set setInteractiveAuthorizationAllowed on SetPassword call

is important that the setpasswod call uses interactive authorization,
otherwise will be denied, unless the user had been modified beforehand
so an authorization was already granted

(cherry picked from commit 48ccb433ca79e94ef705734d9cab599f01df97e8)

M +8 -3 kcms/users/src/user.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/b66f8019a3db00aa1e4e1c54d19f55c9cbff4d12

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package plasma-workspace - 4:5.25.5-0ubuntu4

---------------
plasma-workspace (4:5.25.5-0ubuntu4) kinetic; urgency=medium

  * Add upstream_fix-user-password-kcm.patch (LP: #1983245)

 -- Rik Mills <email address hidden> Wed, 28 Sep 2022 12:05:23 +0100

Changed in plasma-workspace (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
In , G-kde (g-kde) wrote :

*** Bug 459430 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jjhesrbhf (jjhesrbhf) wrote :

Still doesn't work in 5.25.5. It looks like the fix wasn't merged

https://invent.kde.org/plasma/plasma-workspace/-/blob/v5.25.5/kcms/users/src/user.cpp

Revision history for this message
In , Rik Mills (rikmills) wrote :

(In reply to Dmitry Godlevskiy from comment #19)
> Still doesn't work in 5.25.5. It looks like the fix wasn't merged
>
> https://invent.kde.org/plasma/plasma-workspace/-/blob/v5.25.5/kcms/users/src/
> user.cpp

The fix was commited to the 5.25 branch, but as 5.25 will not get any more releases it is up to distros to apply the patch to 5.25.5

Revision history for this message
In , Jjhesrbhf (jjhesrbhf) wrote :

(In reply to Rik Mills from comment #20)
> (In reply to Dmitry Godlevskiy from comment #19)
> > Still doesn't work in 5.25.5. It looks like the fix wasn't merged
> >
> > https://invent.kde.org/plasma/plasma-workspace/-/blob/v5.25.5/kcms/users/src/
> > user.cpp
>
> The fix was commited to the 5.25 branch, but as 5.25 will not get any more
> releases it is up to distros to apply the patch to 5.25.5

Ah okay, thanks

Rik Mills (rikmills)
Changed in plasma-workspace (Ubuntu Jammy):
assignee: Rik Mills (rikmills) → nobody
Changed in plasma-workspace (Ubuntu):
assignee: Rik Mills (rikmills) → nobody
Changed in plasma-workspace (Ubuntu Kinetic):
assignee: Rik Mills (rikmills) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.