Can't create new user in Kubuntu 20.04

Bug #1883357 reported by Jānis Kangarooo
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
kde-workspace
Unknown
Medium
plasma-workspace (Ubuntu)
Triaged
Undecided
Unassigned
user-manager (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

Cant create new user
Pressing + or apply doesnt change anything

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: kde-cli-tools 4:5.18.4.1-0ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-33.37-generic 5.4.34
Uname: Linux 5.4.0-33-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.2
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Sat Jun 13 14:19:30 2020
InstallationDate: Installed on 2020-03-10 (94 days ago)
InstallationMedia: Kubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200310)
SourcePackage: kde-cli-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Elias Probst (eliasp) wrote :

When running the user-manager KCM in an unprivileged environment/as unprivileged user, user-manager still allows to change attributes and doesn't report any issues when clicking "Apply".

The CLI output clearly shows the issues:
log_user_manager unknown: 0
log_user_manager unknown: 132
log_user_manager unknown: 1000
log_user_manager unknown: Saving on Index: 1
log_user_manager unknown: "org.freedesktop.Accounts.Error.PermissionDenied"
log_user_manager unknown: "Authentication is required"
log_user_manager unknown: "org.freedesktop.Accounts.Error.PermissionDenied"
log_user_manager unknown: "Authentication is required"
log_user_manager unknown: "org.freedesktop.Accounts.Error.PermissionDenied"
log_user_manager unknown: "Authentication is required"
log_user_manager unknown: "org.freedesktop.Accounts.Error.PermissionDenied"
log_user_manager unknown: "Authentication is required"
log_user_manager unknown: "org.freedesktop.Accounts.Error.PermissionDenied"
log_user_manager unknown: "Authentication is required"
log_user_manager unknown: Failed Roles: (AccountModel::Username, AccountModel::RealName, AccountModel::Email, AccountModel::Administrator, AccountModel::AutomaticLogin)

Those cases should be handled. Either there's a proper way to determine initially whether the permissions are sufficient to disable relevant UI operations or at least when applying the changes (unsucessfully) a message should be shown.

Running:
- all KF5/Plasma 5 components from git and up-to-date
- Qt 5.4.1
- AccountsService 0.6.40
- D-Bus 1.8.16

Revision history for this message
Jānis Kangarooo (kangarooo) wrote :
Revision history for this message
Kai Kasurinen (kai-kasurinen) wrote :

kcmshell5 user_manager

affects: kde-cli-tools (Ubuntu) → user-manager (Ubuntu)
Revision history for this message
Balint Harmath (bharmath) wrote :

Can you please describe the circumstances?
In which application are you pressing and what button?

For you information: you can add new user at Settings -> Users tab manually.

Changed in user-manager (Ubuntu):
status: New → Incomplete
Revision history for this message
Jānis Kangarooo (kangarooo) wrote :

I click +
I write user name and apply. Doesn't work. No new user

Revision history for this message
Jānis Kangarooo (kangarooo) wrote :
Revision history for this message
Paul White (paulw2u) wrote :

Creating new users works for me in Kubuntu 20.04 but I do need to click 'Apply' after allocating a password. I'm not sure this is being done. Can you confirm Kangaroo Janis?

summary: - Cant create new user
+ Can't create new user in Kubuntu 20.04
Revision history for this message
Jānis Kangarooo (kangarooo) wrote :

Doing the same. Cant create user.

Revision history for this message
Paul White (paulw2u) wrote :

Thanks for confirming that. Reverting status back to 'New'

Changed in user-manager (Ubuntu):
status: Incomplete → New
Revision history for this message
Ma Nu El (mapazarr) wrote :

I had the same problem. Somehow, the GUI fails to request the admin password and doesn't create the user.

Try from the terminal with:
```sudo useradd -m new_user_name```
This will create a new user with a home directory.
Once the user has been created you can change al other parameters, such as password or icon from the User Manager GUI.

I hope it helps. It worked for me :-)

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

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

Changed in user-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Mineirinho da Silva (linuxemacs-yahoo) wrote :

I have the same problem (Can't create new user in Kubuntu 20.04)...

Revision history for this message
In , Strangiato Xanadu (strangiato) wrote :

Still an issue with the new Users kcm of Plasma 5.20 beta.

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

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

Revision history for this message
Seb Bonnard (sebma) wrote :

For the workaround : "Normal" users have no idea of know how to launch a terminal window let alone run a "adduser" command.

I believe this bug should be major because KUbuntu is supposed to be easy to use.

Revision history for this message
Seb Bonnard (sebma) wrote (last edit ):

You can reproduce this bug every time by doing the following :

$ ssh -X remote-PC
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-89-generic x86_64)

 * Documentation: https://help.ubuntu.com
 * Management: https://landscape.canonical.com
 * Support: https://ubuntu.com/advantage

68 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

Web console: https://seb-x-y-z:9090/ or https://192.168.x.Y:9090/

Last login: Sun Nov 7 16:10:48 2021 from 127.0.0.1

.cache -> /tmp/sebastien/.cache/

dim. 07 nov. 2021 16:12:19 CET

$ kcmshell5 user_manager
Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
   QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
   QT_SCREEN_SCALE_FACTORS to set per-screen factors.
   QT_SCALE_FACTOR to set the application global scale factor.
Couldn't load plugin: "The shared library was not found."
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1938, resource id: 32072962, major code: 40 (TranslateCoords), minor code: 0

And then click "Apply", you will notice the sudo password window does not popup.

Revision history for this message
Jānis Kangarooo (kangarooo) wrote :

I told ya. Not fixed still and new version comming. Ping. Stay home. Dont use covid outside or with people covid area zone. Fix bugs! Fixing bugs for virus free system is safe against viruses in air connection transmission.
So many people needed to make new user and couldnt because of this bug not fixed, while people walking around. Need to keep programmers safe in their envaironment. The more bug reports, the safer at home stays fixers! Only then we can beat bug #1 virus environment windows.

Revision history for this message
X (scumby) wrote :

Hey I just got it to work! I was leaving the Real Name field blank because I'm lazy. When I put a name it works as expected. Some sort of message telling the user when this happens would be nice.

Revision history for this message
Jānis Kangarooo (kangarooo) wrote :

#16 x scumby, you are on 20.04 or 22.04?
This bug is about 20.04 and it doesnt work still till this day for almoust 3 years.

Revision history for this message
pbhj (pbhj) wrote (last edit ):

Still doesn't work for me on Ubuntu 23.04 (lunar). Neither direct through "system settings" nor through `kcmshell5 kcm_users`. I tried strace-ing to look for failed file opens. There was some stuff about sonnet and voikko but I think they're just optional so would be expected to fail.

I was never asked for credentials, perhaps the failure is related to [lack of] proper request for credentials?

Happy to run anything to help debug. FWIW the packages I have (which apt-files tells me are the origin of kcm_users) are:

Yavin:~$ apt-cache policy plasma-workspace{,-data}
plasma-workspace:
  Installed: 4:5.27.4.1-0ubuntu1
  Candidate: 4:5.27.4.1-0ubuntu1
  Version table:
 *** 4:5.27.4.1-0ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu lunar/universe amd64 Packages
        100 /var/lib/dpkg/status
plasma-workspace-data:
  Installed: 4:5.27.4.1-0ubuntu1
  Candidate: 4:5.27.4.1-0ubuntu1
  Version table:
 *** 4:5.27.4.1-0ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu lunar/universe amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu lunar/universe i386 Packages
        100 /var/lib/dpkg/status

After some testing, I see that "change password" for an existing user also fails (where `passwd` works). Again, no credentials are requested. I reinstalled pkexec (`sudo apt reinstall pkexec`) but that didn't seem to change anything.

Making users with `useradd -m $NEWUSER` works of course. Once made they appear in the list of `kcmshell5 kcm_users`. If I then try to change the icon for a user instead of asking for credentials/authorization it says "Could not get permission to save user [$USER]" (where the [$USER] is the actual username on my system). In strace it says:

org.kde.kcm_users: "org.freedesktop.Accounts.Error.PermissionDenied" "Authentication is required"

as one might expect. But at no point am I asked for credentials. Searching on that string I get https://bugs.kde.org/show_bug.cgi?id=346691, so have added this to the current report.

Revision history for this message
In , pbhj (pbhj) wrote :
Changed in kde-workspace:
importance: Unknown → Medium
Changed in plasma-workspace (Ubuntu):
status: New → Triaged
Changed in user-manager (Ubuntu):
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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