Bug 336994 - User Manager does not show one particular user in the list unless I login as that user
Summary: User Manager does not show one particular user in the list unless I login as ...
Status: RESOLVED FIXED
Alias: None
Product: user-manager
Classification: Plasma
Component: kcontrol module (show other bugs)
Version: unspecified
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Jonathan Riddell
URL:
Keywords: usability
: 336677 339784 354315 354634 361832 367697 378604 380230 392438 395812 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-03 03:05 UTC by randykgm
Modified: 2020-01-21 16:21 UTC (History)
25 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.12.6


Attachments
User Manager, not showing user 1002 (57.13 KB, image/png)
2015-11-24 21:33 UTC, kramski
Details
KUser, showing user 1002 (137.02 KB, image/png)
2015-11-24 21:34 UTC, kramski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description randykgm 2014-07-03 03:05:01 UTC
I'm using Linux Mint KDE 17.  I did a fresh install with let's abbreviate this 'usera'.  I added 'userb' and saw that message about the password being too simple.  So I made it more complex and just used 'passwd' sudo'd as root to change it; not realizing that the error was just a note and not a show-stopper.  So I 'deluser userb', deleted their home folder, and re-created 'userb'.  Then I created 'userc'.  The problem is that no matter what I do regarding deleting 'userb' via shell or through the tool, I cannot get 'userb' to show up in the user list unless I actually login as 'userb'.  The other users always show up fine.

Reproducible: Always

Steps to Reproduce:
I tried to reproduce this problem again by creating 'userd' and deleting manually or through KDE, and it works fine every time.  I am stuck with 'userb' not showing up in the interface now unless I login as them.  It's a valid account and I did nothing unusual after the cleanup and re-do events.
Actual Results:  
n/a

Expected Results:  
All users should be showing up in the user list with their name and login as they are all administrators.  Something's quirky with 'userb' that KDE isn't showing them unless logging in as 'userb'.

So far, everything else is working great!  Thanks to the KDE team and Linux Mint team.
Comment 1 kramski 2015-11-24 21:33:30 UTC
Created attachment 95711 [details]
User Manager, not showing user 1002
Comment 2 kramski 2015-11-24 21:34:37 UTC
Created attachment 95712 [details]
KUser, showing user 1002
Comment 3 kramski 2015-11-24 21:41:26 UTC
Same here, Plasma 5.4.3/Framework 5.16.0 on a fully updated Arch Linux, see screenshots.

However, my case is much simpler: I just created three new users in user manager without problems (all of them are able to login).

When I returned later to the user list, one user is missing (except when being logged in as that particular user).

See also https://forum.kde.org/viewtopic.php?f=66&t=129490.
Comment 4 Paul Worrall 2016-01-10 16:13:41 UTC
I have encountered exactly the same symptoms with kubuntu 15.10.  User 1002 is not shown in user manager.

paul@desktop:~$ apt-cache policy user-manager 
user-manager:
  Installed: 4:5.4.2-0ubuntu1
  Candidate: 4:5.4.2-0ubuntu1
  Version table:
 *** 4:5.4.2-0ubuntu1 0
        500 http://mirror.ox.ac.uk/sites/archive.ubuntu.com/ubuntu/ wily/universe amd64 Packages
        100 /var/lib/dpkg/status
Comment 5 J.Fly 2016-05-15 03:28:03 UTC
Exact same issue.  I did 'userdel' and removed the home folder but nothing has changed.  Because of this I also can not add permissions correctly through the gui as it does not know there is any other user beside me.
Comment 6 Gus Gustafson 2016-07-07 03:02:47 UTC
I too have this problem on Kubuntu 16.04 with Plasma 5.5.5.

Additionally, in a different, somewhat opposite case, I have found that for a different user I had to delete the account, log out, and delete same user again, in order to finally get that user to disappear from the login screen and the User Manger in System Settings...

I have found that KUser from the repos is more reliable than the tool that's integrated into System Settings.
Comment 7 Holger 2016-07-26 22:51:39 UTC
On May 8th 2015 I added accounts for my 2 nephews.
The younger nephew username "simon" uid 1001 is missing in kcontrol. He only logged in that very day and never again (no idea, if he even remembers his password).
The older nephew username "tobias" uid 1002 logged in a few times (last on June 16th 2016) and is showing in kcontrol as expected.

I've created a new user, showing up fine and also deleted the new user. But simon is still lost, despite the switch-session-screen offers him for login.

@Gus thanx for the KUser tip, now I can at least change his password, should the need arise.

There have been intermediate release-upgrades of Kubuntu ... apport claims I started out with 14.04, working up all the way through 14.10, 15.04, 15.10 and finally 16.04 now
Comment 8 kramski 2016-08-31 16:31:46 UTC
Still unresolved for me with user-manager 5.7.4-1 (on Arch Linux).
Comment 9 f.masse71 2016-11-16 21:53:24 UTC
I had the same problem and I found a workaround to solve it.

By looking at the source code, it seems that User manager uses a cached list of users. If an user was created and it didn't manage to cache it, it will appear in /etc/passwd but won't be present in systemsettings. Fortunately, you can manually cache the user. Type the following in the commandline (replace <username>):

qdbus --system --literal org.freedesktop.Accounts /org/freedesktop/Accounts org.freedesktop.Accounts.CacheUser <username>

Make sure the user was cached using :

qdbus --system --literal org.freedesktop.Accounts /org/freedesktop/Accounts org.freedesktop.Accounts.ListCachedUsers
Comment 10 kramski 2016-11-17 12:00:38 UTC
The workaround looks promising, but unfortunately does not work for me - the list of cached users is the same before and after and does already include the missing id.

So still unresolved for me with user-manager 5.8.3-1.
Comment 11 Pavel 2017-02-04 11:11:28 UTC
Workaround works for me in Plasma 5.9.0.
Comment 12 Paul Worrall 2017-04-17 12:31:17 UTC
Still unresolved for me with plasma 5.9.4 on Kubuntu.  Furthermore, I'm unable to add a new user via system settings -> User Manager.

The work around in comment 9 does not work for me.
Comment 13 Rex Dieter 2017-07-06 14:07:42 UTC
*** Bug 336677 has been marked as a duplicate of this bug. ***
Comment 14 Rex Dieter 2017-07-06 14:08:05 UTC
*** Bug 339784 has been marked as a duplicate of this bug. ***
Comment 15 Rex Dieter 2017-07-06 14:08:21 UTC
*** Bug 361832 has been marked as a duplicate of this bug. ***
Comment 16 Fitzcarraldo 2017-08-07 02:46:21 UTC
I'm currently using Gentoo Linux with the following packages:

a. lightdm-1.18.3 (with the patch in Gentoo Bug Report #605370 for non-systemd installations, although I believe that is irrelevant as far as this bug is concerned)
b. lightdm-gtk-greeter-2.0.1-r1
c. plasma-meta-5.9.5
d. accountsservice 0.6.43-r1

Below is a work-around for this bug, which works in my case. Steps 5 to 7 only apply to SDDM (I use LightDM and have not checked if the steps below are a work-around for an installation using SDDM). The other steps apply to both LightDM and SDDM.

1. I created a 96x96 PNG avatar /home/fitzcarraldo/Pictures/Avatars/Fitzcarraldo.png

2. I edited the file /var/lib/AccountsService/users/fitzcarraldo to contain the following (replace 'en_GB.utf8' with your language)

[User]
Language=en_GB.utf8
XSession=plasma
SystemAccount=false
Icon=/var/lib/AccountsService/icons/fitzcarraldo	

3. I made sure that file has 644 permissions

clevow230ss fitzcarraldo # ls -la /var/lib/AccountsService/users/fitzcarraldo
-rw-r--r-- 1 root root 104 Aug  5 16:43 /var/lib/AccountsService/users/fitzcarraldo	

4. I copied the avatar to the relevant directory and made sure it has 644 permissions

clevow230ss fitzcarraldo # cp /home/fitzcarraldo/Pictures/Avatars/Fitzcarraldo.png /var/lib/AccountsService/icons/fitzcarraldo
clevow230ss fitzcarraldo # ls -la /var/lib/AccountsService/icons/fitzcarraldo
-rw-r--r-- 1 root root 12667 Aug  5 16:23 /var/lib/AccountsService/icons/fitzcarraldo	

5. I also copied the avatar to ~/.face.icon (possible SDDM requirement, I believe)

fitzcarraldo@clevow230ss ~ $ cp ~/Pictures/Avatars/Fitzcarraldo.png ~/.face.icon	

6. I edited /etc/sddm.conf and changed the path of FacesDir as shown below

# Face icon directory
# The files should be in username.face.icon format
#FacesDir=/usr/share/sddm/faces
FacesDir=/var/lib/AccountsService/icons/

7. I put a copy of the avatar in FacesDir with the file name I believe SDDM requires

clevow230ss fitzcarraldo # cp /home/fitzcarraldo/Pictures/Avatars/Fitzcarraldo.png /var/lib/AccountsService/icons/fitzcarraldo.face.icon	

8. I rebooted (logging out is not sufficient).

I now have the avatar Fitzcarraldo.png on LightDM's GTK Greeter screen, on the KDE Plasma 5 Lock screen, in 'System Settings' > 'Account Details' > 'User Manager', and at the top of the KDE Plasma 5 Application Launcher menu.

I recommend not using 'System Settings' > 'Account Details' > 'User Manager' until the bug is squashed, but you can copying the avatars of the other users in your installation to /var/lib/AccountsService/icons/ and add/edit the other users' files in /var/lib/AccountsService/users/ as I explained above. I have always used the utility superadduser on the command line to add new users (if it's not available in your distribution then use your distribution's usual command-line commands to add a new user). I have now used it to add a new user, and then I manually repeated the process I described above. The avatar of the new user is displayed correctly everywhere it should be, and my own account's avatar is still displayed everywhere it should be. So I can achieve everything without touching 'System Settings' > 'Account Details' > 'User Manager'.
Comment 17 Fitzcarraldo 2017-08-07 15:33:47 UTC
I've been investigating further. 'Missing' users are displayed in the User Manager GUI if I launch System Settings using ksudo:

$ kdesu5 systemsettings5	

If I do that, a user who is not shown when System Settings is launched either by using the command 'systemsettings5' in a Konsole window or by using the KDE Application Launcher, does appear in the 'User Manager' GUI.
Comment 18 Christoph Feck 2017-08-23 19:22:18 UTC
*** Bug 380230 has been marked as a duplicate of this bug. ***
Comment 19 Christoph Feck 2017-08-23 19:22:53 UTC
*** Bug 378604 has been marked as a duplicate of this bug. ***
Comment 20 Christoph Feck 2017-08-23 19:25:06 UTC
*** Bug 354634 has been marked as a duplicate of this bug. ***
Comment 21 Christoph Feck 2017-08-23 19:25:15 UTC
*** Bug 367697 has been marked as a duplicate of this bug. ***
Comment 22 Alberto Salvia Novella 2017-08-23 23:42:13 UTC
I can reproduce this bug. Please set status to "confirmed". Thank you.
Comment 23 Christoph Feck 2017-08-24 00:11:16 UTC
We could not yet confirm if the bug is in the user-manager, or in the accountsservice.
Comment 24 Jack 2017-10-15 19:49:39 UTC
I'm seeing this also, on Gentoo with systemsetting 5.10.5 - multiple users "missing."  What can I do, or info can I provide to help track down?
Comment 25 Jack 2017-10-15 19:53:15 UTC
Of course as soon as I posted that, I discovered what is likely my issue, but may or may not affect anyone else.  In my case, the "missing" users, have id's below 1000.  In my case, this is because those users were originally created on a different system, years ago, but I migrated and upgraded over the years, and didn't want to change existing userid's.  At some point, I suppose I'll have to break down and do so.
Comment 26 Christoph Feck 2018-03-28 11:04:48 UTC
*** Bug 392438 has been marked as a duplicate of this bug. ***
Comment 27 Valerii Malov 2018-05-12 15:43:16 UTC
There seem to be multiple separate issues

On Gentoo in particular AccountsService seems to be broken because of /etc/passwd and /etc/shadow mismatch on "old" installs: portage user is sometimes missing from /etc/shadow but is present in /etc/passwd. This causes AccountsService to go haywire. This can be fixed (back up your stuff beforehand) by regenerating shadow with pwconv. I'm not sure if /etc/shadow can be considered malformed in this case or it is worth reporting to AccountsService bugtracker.

Another problem is that we accidentally overwrite first item in the model when polling AccountsService via dbus with currently logged in user. This causes some other user to disappear from the list. If anyone wants to review the patch: https://phabricator.kde.org/D12837
Comment 28 Valerii Malov 2018-05-16 16:01:18 UTC
Git commit ff88e24e4380a341f70f9b005acbce2ae9afa60a by Valeriy Malov.
Committed on 16/05/2018 at 16:01.
Pushed by valeriymalov into branch 'Plasma/5.12'.

Split replaceAccount from addAccountToCache

Summary:
We were accidentally overwriting first account in the model with
currently logged in user after polling AccountsService

Test Plan: check if kcmshell5 user_manager lists mutliple users on cold boot

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, ngraham, rdieter, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D12837

M  +16   -10   src/lib/accountmodel.cpp
M  +1    -0    src/lib/accountmodel.h

https://commits.kde.org/user-manager/ff88e24e4380a341f70f9b005acbce2ae9afa60a
Comment 29 Christoph Feck 2018-06-24 12:02:23 UTC
*** Bug 395812 has been marked as a duplicate of this bug. ***
Comment 30 Nate Graham 2020-01-21 16:21:01 UTC
*** Bug 354315 has been marked as a duplicate of this bug. ***