No users appear in settings

Bug #1876460 reported by Krister Swenson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

1. Open the gnome control center
2. Click on "users"
3. See that there are no users (see attached screenshot). The message says "No Ussers Found", "Unlock to add a user account."

There is no button to unlock.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gnome-control-center 1:3.36.1-1ubuntu5
ProcVersionSignature: Ubuntu 5.4.0-28.32-generic 5.4.30
Uname: Linux 5.4.0-28-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Sat May 2 15:27:03 2020
SourcePackage: gnome-control-center
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Krister Swenson (thekswenson) wrote :
Revision history for this message
Krister Swenson (thekswenson) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Can you please start gnome-control-center from terminal via this command:

gnome-control-center user-accounts

and let us know about possible warning and error messages.

Changed in gnome-control-center (Ubuntu):
status: New → Incomplete
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Also, can you please run this command:

sudo ls /var/lib/AccountsService/users

and show us what it outputs.

Revision history for this message
Krister Swenson (thekswenson) wrote :

-- kms@praxis:~
=> gnome-control-center user-accounts
-- kms@praxis:~
=> sudo ls /var/lib/AccountsService/users
[sudo] password for kms:
gdm kms

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

So no messages at all as a result of the first command, is that correct?

What's your user id? Can be found through this command:

id -u kms

Revision history for this message
Krister Swenson (thekswenson) wrote : Re: [Bug 1876460] Re: No users appear in settings

=> id -u kms
501

On Sat, May 2, 2020 at 4:30 PM Gunnar Hjalmarsson <
<email address hidden>> wrote:

> So no messages at all as a result of the first command, is that correct?
>
> What's your user id? Can be found through this command:
>
> id -u kms
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1876460
>
> Title:
> No users appear in settings
>
> Status in gnome-control-center package in Ubuntu:
> Incomplete
>
> Bug description:
> 1. Open the gnome control center
> 2. Click on "users"
> 3. See that there are no users (see attached screenshot). The message
> says "No Ussers Found", "Unlock to add a user account."
>
> There is no button to unlock.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 20.04
> Package: gnome-control-center 1:3.36.1-1ubuntu5
> ProcVersionSignature: Ubuntu 5.4.0-28.32-generic 5.4.30
> Uname: Linux 5.4.0-28-generic x86_64
> NonfreeKernelModules: wl
> ApportVersion: 2.20.11-0ubuntu27
> Architecture: amd64
> CasperMD5CheckResult: skip
> CurrentDesktop: ubuntu:GNOME
> Date: Sat May 2 15:27:03 2020
> SourcePackage: gnome-control-center
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1876460/+subscriptions
>

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2020-05-02 17:56, Krister wrote:
> => id -u kms
> 501

That's most likely the explanation. Ubuntu and GNOME expect the user id of a regular user to be 1000 or above. So if you change the id, your user will show up in Settings.

Closing this bug.

Changed in gnome-control-center (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Krister Swenson (thekswenson) wrote :

Boy, that's strange.

But I should be able to add a user nonetheless, right?
The users screen gives me no option to add a user.

Revision history for this message
Krister Swenson (thekswenson) wrote :

I've changed my UID to 1001 but continue to have the same problem with the settings.

=> id -u kms
1001

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2020-05-02 18:49, Krister wrote:
> Boy, that's strange.

Really? Only you can tell how it happened. ;)

> But I should be able to add a user nonetheless, right?

Not via the GUI, since it's not aware of users with id < 1000.

One option is to add a new admin user from command line:

sudo adduser kms2
sudo adduser kms2 sudo

> I've changed my UID to 1001 but continue to have the same problem
> with the settings.
>
> => id -u kms
> 1001

Did you edit /etc/passwd manually? If so you probably need to reboot for the change to be effective everywhere. But be careful! It may be a good idea to first create a new admin user from command line as I just showed.

Revision history for this message
Krister Swenson (thekswenson) wrote :

I did reboot before trying. Nothing changed with gnome-control-center.

I used "usermod" to change the uid.
Then I used "find / -user 501 -exec chown -h kms {} \;" to change any other files in the filesystem.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Ok..

Can you please also try with creating an additional user from command line as I suggested?

Revision history for this message
Krister Swenson (thekswenson) wrote :

The new user appears in the control center. The unlock button also appears now.

The funny thing is that the new user's uid is 500:

=> id -u test
500

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Then Settings is more allowing than I thought.

But if the uid is 500, you either set that explicitly now or have previously changed some configuration file.

So I still don't see any reproducible gnome-control-center bug.

Revision history for this message
Krister Swenson (thekswenson) wrote :

I have a user with uid 1001 that doesn't show up in the gnome-control-center. Is this not a bug?

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Can't really tell. But it's obvious that you have the ability to configure your user, and also did so. We don't have the information needed to say if the configuration you did is of such a nature that gnome-control-center ought to recognize it.

So if you take a newly created user (which g-c-c does recognize) and change it in a similar way as you did with your original user, so g-c-c no longer sees it, and let us know exactly what you did, then we have something to take a stand on.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you copy the /etc/passwd line for the user not listed?
What's the content of /var/lib/AccountsService/users/<username> ?

Accountsservice does some filtering on things like having a valid shell

Could you also include the log of?
$ /usr/lib/accountsservice/accounts-daemon --debug

Changed in gnome-control-center (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

The screenshot with shows no button when no user is listed sounds like a valid bug, it should allow to unlock/add the user as stated in the screen, could you report that upstream on https://gitlab.gnome.org/GNOME/gnome-control-center/issues ?

Revision history for this message
Krister Swenson (thekswenson) wrote :

=> grep kms /etc/passwd
kms:x:1001:501:Krister Swenson,,,:/home/kms:/bin/bash

=> sudo more /var/lib/AccountsService/users/kms
[User]
Session=
FormatsLocale=fr_FR.UTF-8
XSession=ubuntu-wayland
Icon=/home/kms/.face
SystemAccount=true

[InputSource0]
xkb=us+mac

[InputSource1]
xkb=fr

Revision history for this message
Krister Swenson (thekswenson) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

hum, so /var/lib/AccountsService/users/kms has SystemAccount=true for some reason ... if you delete that file does it get re-created with the same value?

Revision history for this message
Krister Swenson (thekswenson) wrote :

So, it's created with "false", and everything is back to normal...
  thank you Sebastien!

Revision history for this message
Sebastien Bacher (seb128) wrote :

you're welcome, it's still confusing that it was flagged as system user before ... did you have another shell set or something non standard? also there seems to be a bug that the status of system being true or false isn't revisited if the user change

Revision history for this message
Krister Swenson (thekswenson) wrote :

This machine has gone through all successive upgrades of all versions (not just LTS) since 2014. This is probably some incompatibility between some version of the Unity and Gnome. Is it possible that Unity used this as a way to hide users from the login screen? I believe I remember having that as an option at some point.

Revision history for this message
Sebastien Bacher (seb128) wrote :

I don't think unity/lightdm change user account details, there was a greeter option to list/hide users but that was just lightdm configuration.

thanks for upstreaming https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/988 , they have proposed a fix for review now so that should address the 'can't add user' issue

the user flagged as system is not a gnome-control-center issue and it's a bit difficult to say what made the user being flagged as system one at this point, I will still check if accountsservice fail to reconsider status when user change though

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2020-05-05 09:46, Krister wrote:
> Is it possible that Unity used this as a way to hide users from the
> login screen? I believe I remember having that as an option at some
> point.

Changing to "SystemAccount=true" is indeed a way (workaround) to hide a user from the login screen when using lightdm + accountsservice. Only configuring lightdm is not sufficient due to accountsservice.

Apparently it lead to it being hidden at more places. :)

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Sebastien: If g-c-c does not know about any users, to which user would it grant access to "Unlock"?

Revision history for this message
Sebastien Bacher (seb128) wrote :

> @Sebastien: If g-c-c does not know about any users, to which user would it grant access to "Unlock"?

The currently logged in user, if g-c-c is started there has to be an active user owning the session

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Sounds reasonable. Let's check it when the change reaches Ubuntu.

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.