User disappeared from the users list

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
Girafenaine
Level 2
Level 2
Posts: 66
Joined: Thu Aug 13, 2015 10:37 am

User disappeared from the users list

Post by Girafenaine » Tue Jul 03, 2018 3:28 pm

Hello,

I have just installed LM 19 xfce (on a Macbook 5.1, unibody late 2008, dualboot with MacOS 10.6.8 ).

I created my user on installation. In order to make easier communication between both OS and shared documents, I then changed uid for 501 (MacOS default), instead of 1000 (Linux default). As suggested on many forums, I changed /etc/passwd from another session to set uid and gid at 501. I changed /etc/group and /etc/login.defs to set uid_min and gid_min to 500 instead of 1000.

However, when I log out, on the "greet screen", there is not my user (there is only another user I created for a test, and the "guest session"). Do you know how my user could appear again on the "greet screen" ? (I have an auto login at the booting, so I can run my own session by switching off then switching on)

Bonus question : when I click on the "log out" button of the whisker menu, it logs out immediatly, without asking choice between reboot, change session, or turning off. The command is "xfce4-session-logout". The same command on another session with another user gives the normal choice. I cannot understand what I have to modify to make this command to work with my user.

Could you help me ?

Girafenaine
MacBook 5.1 (Dual core Intel Core2)
Dual boot MacOS 10.6.8 (36 Go HFSplus partition) / Linux Mint 19 xfce 64bits (39 Go ext4 partition) / shared partition for documents (400 Go HFSplus partition)

User avatar
karlchen
Level 19
Level 19
Posts: 9323
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: User disappeared from the users list

Post by karlchen » Tue Jul 03, 2018 6:52 pm

Hello, Girafenaine.

Have you also checked and corrected the file /etc/lightdm/users.conf, parameter minimum-uid=500?
Comment/explanation in the file itself: minimum-uid = Minimum UID required to be shown in greeter

HTH,
Karl
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

Girafenaine
Level 2
Level 2
Posts: 66
Joined: Thu Aug 13, 2015 10:37 am

Re: User disappeared from the users list

Post by Girafenaine » Wed Jul 04, 2018 6:12 am

Hello Karlchen,

Thanks for your reply. I will try this at night. It looks good... And I'll tell you whether it works.

Girafenaine
MacBook 5.1 (Dual core Intel Core2)
Dual boot MacOS 10.6.8 (36 Go HFSplus partition) / Linux Mint 19 xfce 64bits (39 Go ext4 partition) / shared partition for documents (400 Go HFSplus partition)

Girafenaine
Level 2
Level 2
Posts: 66
Joined: Thu Aug 13, 2015 10:37 am

Re: User disappeared from the users list

Post by Girafenaine » Wed Jul 04, 2018 3:30 pm

Hello,

Unfortunately it is already correctly set, with minimum-uid = 500. Yet my user does not appear.

Any other idea ?

Girafenaine
MacBook 5.1 (Dual core Intel Core2)
Dual boot MacOS 10.6.8 (36 Go HFSplus partition) / Linux Mint 19 xfce 64bits (39 Go ext4 partition) / shared partition for documents (400 Go HFSplus partition)

User avatar
karlchen
Level 19
Level 19
Posts: 9323
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: User disappeared from the users list

Post by karlchen » Thu Jul 05, 2018 1:48 am

Hello, Girafenaine.
The only hint which I found to yet another location where the minimal UID might be configured has been mentioned in the file /etc/lightdm/users.conf: something related to accountservice.
Yet, I have not figured out where it might define a minimal UID, yet.
Sorry. No new helpful idea at the moment. :(
Karl
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

Girafenaine
Level 2
Level 2
Posts: 66
Joined: Thu Aug 13, 2015 10:37 am

Re: User disappeared from the users list

Post by Girafenaine » Thu Jul 05, 2018 7:34 am

OK Karlchen, vielen Dank for your help.

There could be another reason than a "minimum uid" in a config file that would make an existing user not to appear on the greet screen ?

It could be something that would be linked to the strange behaviour of my "log out" button in the Whisker menu, deconnecting my user instead of giving me a choice.

Any helpful hand ?

Girafenaine
MacBook 5.1 (Dual core Intel Core2)
Dual boot MacOS 10.6.8 (36 Go HFSplus partition) / Linux Mint 19 xfce 64bits (39 Go ext4 partition) / shared partition for documents (400 Go HFSplus partition)

rene
Level 8
Level 8
Posts: 2182
Joined: Sun Mar 27, 2016 6:58 pm

Re: User disappeared from the users list

Post by rene » Fri Jul 06, 2018 2:56 pm

You want to change UID_MIN and GID_MIN in /etc/login.defs from 1000 to 500.

Just now verified on 18.3 Cinnamon. Do believe to have noticed you need to actually restart lightdm for the changes to take effect, not just logout. I.e., sudo systemctl restart lightdm (this logs you out!) or just reboot.

rene
Level 8
Level 8
Posts: 2182
Joined: Sun Mar 27, 2016 6:58 pm

Re: User disappeared from the users list

Post by rene » Sat Jul 07, 2018 6:18 am

Seeing as how there's no reply...

Re-read you had already tried this; note that I actually suspect that it's SYS_UID_MAX and SYS_GID_MAX that are the issue, it's just that those default to UID_MIN-1 and GID_MIN-1 respectively. Commented on that on an earlier edit of my above reply until I decided that it didn't matter, since adjusting the latter values yet not the former didn't make sense anyway. However, if you while experimenting perhaps uncommented SYS_{U,G}ID_MAX and set them explicily, best to re-comment them. Also note the "restart lightdm/reboot" bit of course, but this has been verified to in fact work.

Girafenaine
Level 2
Level 2
Posts: 66
Joined: Thu Aug 13, 2015 10:37 am

Re: User disappeared from the users list

Post by Girafenaine » Tue Jul 10, 2018 5:38 pm

Hello,

Thank very much for your answer and help.

In my /etc/login.defs, SYS_UID_MIN = 100 and SYS_UID_MAX = 999, but these lines are commented.
(same values fort GID)

I am stuck with my invisible user in greet screen, and I do not know where I have to look for.

Girafenaine
MacBook 5.1 (Dual core Intel Core2)
Dual boot MacOS 10.6.8 (36 Go HFSplus partition) / Linux Mint 19 xfce 64bits (39 Go ext4 partition) / shared partition for documents (400 Go HFSplus partition)

rene
Level 8
Level 8
Posts: 2182
Joined: Sun Mar 27, 2016 6:58 pm

Re: User disappeared from the users list

Post by rene » Tue Jul 10, 2018 6:09 pm

Just tried this on Mint 19 Cinnamon 64-bit as well. After changing only UID_MIN and GID_MIN in /etc/login.defs from 1000 to 500, a user "test" added as sudo adduser --uid 500 test appears on the login screen after rebooting.

Since there would appear to be no reason this would be different for you I'd try that same adduser command and see if "test" does show up. If so it would appear that your problem is elsewhere. I.e., reading your original post, did you change owner on your home directory? As in, as your "invisible" user, sudo chown -R $(whoami): ~? This being a problem would not match with autologin apparently working but frankly I can't think of anything else -- unless you did something wrong manually changing /etc/passwd and /etc/group: compare the results of the adduser command with your own edits.

Normally changing UID_MIN and GID_MIN is all you need, and Just Works here, on 18 and 19.

[EDIT] Note, slight edit: added ":" after the $(whoami) in the above chown command to also set group.

dougy
Level 1
Level 1
Posts: 15
Joined: Mon Sep 10, 2018 11:14 am

Re: User disappeared from the users list

Post by dougy » Thu Sep 13, 2018 3:42 am

I'm having the same problem as the OP except I installed Cinnamon Mint 19 onto a 2007 Mac Mini. It's dual booting with Ubuntu 14.04. I created the initial user during installation and two subsequent users with the Users & Groups afterwards. The uids of the 3 users are 1000, 1001, & 1002. I had user list enabled on my login screen and they were there initially.

Then I changed the UID of the users to match what they were on the Mac (502, 503 & 504). But for whatever reason, I changed them back to 1000 - 1002 and did a chown on the drive instead. Since then, the users list no longer appears in the login screen or in Users & Groups screen. I created a new user with in Users & Groups and it shows up in the users list. And then I nearly had a coronary because I couldn't login because my username wasn't in the list. Luckily I was able to run the Login Windows utility as my new standard user and authenticate up to hide the user list on the login screen.

Anyway, it's a minor annoyance. I generally don't display the user list on the login window anyway, but I dislike more the fact that the system isn't working as it should be.

rene
Level 8
Level 8
Posts: 2182
Joined: Sun Mar 27, 2016 6:58 pm

Re: User disappeared from the users list

Post by rene » Thu Sep 13, 2018 4:47 pm

You did not specify how you changed UID's from 1000-1002 to 502-504 and back. OP did through manual editing of /etc/passwd and when I do likewise, even though the now 502-504 users disappear from the Mint 19 Cinnamon login screen, they reappear the second I manually change them back to 1000-1002. He never reported back so we don't know what his issue in the end was: I'll need to be able to reproduce yours to be able to say anything additional (although it's likely an issue of AccountsService; am not however reproducing, so shall need the description).

Note for other readers as well: manual editing of /etc/passwd is by the way even though it can work not a good idea; usermod -u is better -- although I'd be surprised if in in fact in this case matters.

dougy
Level 1
Level 1
Posts: 15
Joined: Mon Sep 10, 2018 11:14 am

Re: User disappeared from the users list

Post by dougy » Thu Sep 13, 2018 9:50 pm

rene wrote:
Thu Sep 13, 2018 4:47 pm
You did not specify how you changed UID's from 1000-1002 to 502-504 and back. OP did through manual editing of /etc/passwd and when I do likewise, even though the now 502-504 users disappear from the Mint 19 Cinnamon login screen, they reappear the second I manually change them back to 1000-1002. He never reported back so we don't know what his issue in the end was: I'll need to be able to reproduce yours to be able to say anything additional (although it's likely an issue of AccountsService; am not however reproducing, so shall need the description).

Note for other readers as well: manual editing of /etc/passwd is by the way even though it can work not a good idea; usermod -u is better -- although I'd be surprised if in in fact in this case matters.
I did use the usermod -u command. I didn't touch the /etc/password file. But I just did a look up of the -u flag and it says it's used to assign UID for the user account between 0 to 999. It worked in changing the uid, which I verified with the id command, but maybe it broke something else. I don't know what that would be though.

Now thinking back, it's possible the user list wasn't working in my Mint install either but it is definitely working in the Ubuntu 14.04 install.

To the OP, do you see your users when you start Users & Groups?

rene
Level 8
Level 8
Posts: 2182
Joined: Sun Mar 27, 2016 6:58 pm

Re: User disappeared from the users list

Post by rene » Fri Sep 14, 2018 11:55 am

Just not reproducing. I on a new Mint 19 Cinnamon 64-bit VM tried:

1. as "rene" (1000) add users foo (1001) and bar (1002) through Users and Groups.
2. logout or reboot to see them on the login screen
3. as "rene", sudo usermod -u 503 foo, sudo usermod -u 504 bar
4. logout or reboot to see only "rene" left on the login screen
5. as "rene", sudo usermod -u 1001 foo, sudo usermod -u 1002 bar
6. logout or reboot to see them restored to the login screen

7. repeat 1-6 while inserting 2.33 and 2.67, actually login once as "foo" and "bar" resp.; no change.

8. repeat 3-6 while adding sudo usermod -u 502 rene to 3 (from a virtual console, and after sudo systemctl stop user@1000)
9. logout or reboot to see no user left on the login screen
a. login on a virtual console and restore all UIDs to 1000-1002
b. logout or reboot to see all users restored to the login screen

c. repeat the entire shebang on a new VM with home encryption for "rene"; as far as "login screen" is concerned, all the same.

That is, I just don't know what you did. What I was expecting before I tried was for example files in /var/lib/AccountsService/users/ having gained a "SystemAccount=true" line. Check I guess, but if you in fact managed to do that I'd like to know how...

dougy
Level 1
Level 1
Posts: 15
Joined: Mon Sep 10, 2018 11:14 am

Re: User disappeared from the users list

Post by dougy » Fri Sep 14, 2018 6:27 pm

rene wrote:
Fri Sep 14, 2018 11:55 am
Just not reproducing. I on a new Mint 19 Cinnamon 64-bit VM tried:

1. as "rene" (1000) add users foo (1001) and bar (1002) through Users and Groups.
2. logout or reboot to see them on the login screen
3. as "rene", sudo usermod -u 503 foo, sudo usermod -u 504 bar
4. logout or reboot to see only "rene" left on the login screen
5. as "rene", sudo usermod -u 1001 foo, sudo usermod -u 1002 bar
6. logout or reboot to see them restored to the login screen

7. repeat 1-6 while inserting 2.33 and 2.67, actually login once as "foo" and "bar" resp.; no change.

8. repeat 3-6 while adding sudo usermod -u 502 rene to 3 (from a virtual console, and after sudo systemctl stop user@1000)
9. logout or reboot to see no user left on the login screen
a. login on a virtual console and restore all UIDs to 1000-1002
b. logout or reboot to see all users restored to the login screen

c. repeat the entire shebang on a new VM with home encryption for "rene"; as far as "login screen" is concerned, all the same.

That is, I just don't know what you did. What I was expecting before I tried was for example files in /var/lib/AccountsService/users/ having gained a "SystemAccount=true" line. Check I guess, but if you in fact managed to do that I'd like to know how...
I checked the AccountService directory and there is indeed a file for each user with SystemAccount=true. So I just created a new user and it is set to false in that file. Hmmm, that's interesting. I'll try setting it false in one of the existing users and see if that affects anything. I've got a copy process going still so I'll try it when it completes.

rene
Level 8
Level 8
Posts: 2182
Joined: Sun Mar 27, 2016 6:58 pm

Re: User disappeared from the users list

Post by rene » Fri Sep 14, 2018 6:39 pm

dougy wrote:
Fri Sep 14, 2018 6:27 pm
I checked the AccountService directory and there is indeed a file for each user with SystemAccount=true.
That is no doubt in fact it then. Which is to say I might as well have simply suggested it instead of trying to reproduce but I didn't want to throw out a "random" notion without checking it could actually conceivably be the issue. As said, no idea how you managed them to become SystemAccounts -- but oh well.

dougy
Level 1
Level 1
Posts: 15
Joined: Mon Sep 10, 2018 11:14 am

Re: User disappeared from the users list

Post by dougy » Fri Sep 14, 2018 8:28 pm

rene wrote:
Fri Sep 14, 2018 6:39 pm
dougy wrote:
Fri Sep 14, 2018 6:27 pm
I checked the AccountService directory and there is indeed a file for each user with SystemAccount=true.
That is no doubt in fact it then. Which is to say I might as well have simply suggested it instead of trying to reproduce but I didn't want to throw out a "random" notion without checking it could actually conceivably be the issue. As said, no idea how you managed them to become SystemAccounts -- but oh well.
Yep that fixed it. I set SystemAccount=false on all 3 users and after a reboot they show up in the login user list and in Users & Groups. I set the uid of my test user to 500 and after a reboot, it no longer appeared in the login user list nor in Users & Groups, however, SystemAccount was false. So in this case it was the uid that prevented it from being listed. I have no idea how the SystemAccount flag got enabled on my other accounts though. Anyway, thanks for your help.

Post Reply

Return to “Other topics”