You are not logged in.

#1 2018-07-10 15:48:05

zhaoxin
Member
Registered: 2018-07-10
Posts: 8

[SOLVED] How to get 'Dynamic User' out of your login screen?

I use archlinux with xfce and lightdm.
Today, I find a 'Dynamic User' name in the lightdm login user select list.
I found nobody called 'Dynamic User' in /etc/passwd /etc/group...
I searched with Google, and found nothing about "Archlinux lightdm Dynamic User".
Any one can explain this for me? I can not sleep well with this strange 'Dynamic User' in my heart, thanks!

89238441.jpg

Is this Dynamic User normal? How can people get it out of the login user list?

UPDATE 2018-07-13:

fhdk said installing accountsservice package can solve this problem, and it did! But fhdk did not give the reason...

sudo pacman -Syu accountsservice

And the package name did not tell me the reason neither ...

$ sudo pacman -Ss accountsservice
extra/accountsservice 0.6.50-1
    D-Bus interface for user account query and manipulation

Who is this 'Dynamic User' is still a question to me... thanks fhdk for making it disappeared ...

UPDATE the same day:

Thanks for progandy!

progandy wrote:

If accountsservice is installed, then lightdm uses it to determine whether a user should be shown in the login screen.
If it is not installed, then /etc/lightdm/users.conf is used. You can probably add the dynamic user there to hide it without accountsservice.
Can you see a dynamic user in the output of "getent passwd"? What is the exact line?

Edit: I think it should be enought to add /sbin/nologin to the hidden shells.

hidden-shells=/bin/false /usr/bin/nologin /sbin/nologin

This `getent passwd` command tells me:
"systemd-timesync:*:62583:62583:Dynamic User:/:/sbin/nologin"

and my '/etc/lightdm/users.conf' says:

[UserList]
minimum-uid=1000
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/bin/nologin

First, this user is not in '/etc/passwd', but 'getent passwd' command shows this user!
Second, 'Dynamic User' is the long name of the user 'systemd-timesync'!
Third, 'systemd-timesync' account is a 'nologin' one, and its shell is '/sbin/nologin', while '/etc/lightdm/users.conf' only hide for '/bin/false' and '/usr/bin/nologin', so this strange 'Dynamic User' was displayed in my login screen.

At last, I uninstalled the 'accountsservice' package and add '/sbin/nologin' to file '/etc/lightdm/user.conf' as progandy said, now this problem is solved!

[UserList]
minimum-uid=1000
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/bin/nologin /sbin/nologin

Last edited by zhaoxin (2018-07-13 08:45:47)


love to learn, love to code and love archlinux and the open source world

Offline

#2 2018-07-10 16:17:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,284
Website

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-07-10 16:25:34

zhaoxin
Member
Registered: 2018-07-10
Posts: 8

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

Thank you! and
I found this page, but after read I don't understand it sad

Now, I just want to know if this Dynamic User is normal and can I get it out of my login form. I think it was not there days before.

Last edited by zhaoxin (2018-07-10 16:27:09)


love to learn, love to code and love archlinux and the open source world

Offline

#4 2018-07-10 16:34:33

damjan
Member
Registered: 2006-05-30
Posts: 400

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

zhaoxin wrote:

I use archlinux with xfce and lightdm.
Today, I find a 'Dynamic User' name in the lightdm login user select list.
I found nobody called 'Dynamic User' in /etc/passwd /etc/group...
I searched with Google, and found nothing about "Archlinux lightdm Dynamic User".
Any one can explain this for me? I can not sleep well with this strange 'Dynamic User' in my heart, thanks!

screen shot?

Offline

#5 2018-07-10 17:03:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,284
Website

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

If you had found the page, you should have mentioned that.  What don't you understand.  I don't use lightDM, so I cannot test it myself, but it seems pretty straightforward: if DynamicUser=yes enables it, I'm pretty sure DynamicUser=no would disable it.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2018-07-10 17:40:04

loqs
Member
Registered: 2014-03-06
Posts: 6,173

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

@Trilby I do not believe it will be lightdm itself https://git.archlinux.org/svntogit/pack … es/lightdm
The lightdm-greeter is enumerating all UIDs 1000 and over and that would include any dynamic users created for any running service.
Switching services from DynamicUser=yes to DynamicUser=no may also cause the service to break if for instance on a clean install the systemd-resolve and systemd-network users would not exist.
Edit:
lightdm uses accountservice to provide the user list which I would have thought would ignore DynamicUser as having an invalid shell https://cgit.freedesktop.org/accountsse … ify.c#n156
https://github.com/systemd/systemd/blob … temd.c#L26

Last edited by loqs (2018-07-10 18:07:15)

Offline

#7 2018-07-11 02:02:19

zhaoxin
Member
Registered: 2018-07-10
Posts: 8

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

damjan wrote:
zhaoxin wrote:

I use archlinux with xfce and lightdm.
Today, I find a 'Dynamic User' name in the lightdm login user select list.
I found nobody called 'Dynamic User' in /etc/passwd /etc/group...
I searched with Google, and found nothing about "Archlinux lightdm Dynamic User".
Any one can explain this for me? I can not sleep well with this strange 'Dynamic User' in my heart, thanks!

screen shot?

89238441.jpg


love to learn, love to code and love archlinux and the open source world

Offline

#8 2018-07-11 02:11:52

zhaoxin
Member
Registered: 2018-07-10
Posts: 8

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

I think people are making the Linux environment more and more complex. sad
Distributions, Tools, Histories, Codes, Settings, Changes, Stories, Depends ... all is so hard a work to any new Linux leaner, and even to some of them after years.

Guy, is really a garden there? "Simple is better than Complex." -- the Zen of Python

Last edited by zhaoxin (2018-07-11 03:25:49)


love to learn, love to code and love archlinux and the open source world

Offline

#9 2018-07-11 02:57:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 26,054
Website

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

Read the Code of Conduct and only post thumbnails: http://wiki.archlinux.org/index.php/Cod … s_and_code

You can't really complain about complexity when you voluntarily installed bloat like a display manager.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#10 2018-07-11 09:24:52

Omar007
Member
Registered: 2015-04-09
Posts: 265

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

This is a complete shot in the dark as I'm not familiar at all with LightDM but what are the chances this is some kind of guest account functionality?
Supposedly LightDM has a property for that in its config files; allow-guest
https://www.freedesktop.org/wiki/Softwa … iguration/

Offline

#11 2018-07-13 05:15:37

joks
Member
Registered: 2018-07-13
Posts: 1

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

zhaoxin did you solve your problem with dynamic user? i use lightdm slight greeter and i have too this "dynamic user" at login screen. i check my services from /etc/systemd/system/ and i found that dynamic user = yes entry is in file systemd-timesyncd.service but when i edit this file and change "dynamic user" from "yes" to "no" after i reboot my computer this service not start:

sudo systemctl list-units --state=failed
  UNIT                      LOAD   ACTIVE SUB    DESCRIPTION                 
● systemd-timesyncd.service loaded failed failed Network Time Synchronization

so the only way to disable dynamic user at login screen is disable network time synchronization

sudo systemctl disable systemd-timesyncd.service

Last edited by joks (2018-07-13 05:26:27)

Offline

#12 2018-07-13 06:18:30

fhdk
Member
Registered: 2015-07-17
Posts: 2

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

Installing the package accountsservice removes the strange Dynamic User

sudo pacman -Syu accountsservice

Offline

#13 2018-07-13 06:52:30

zhaoxin
Member
Registered: 2018-07-10
Posts: 8

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

Maybe jokes's anwser can sovle this problem, while fhdk's anwser does solve this problem, but why?

As an old student of programming I love and thanks to every one working hard or learning hard in/for the open source community ... I love to code and I love to learn ... but... what exactly is this tool for, from its name "user account query and manipulation tool" I got no idea, maybe today no one can finish his study on Linux with his limit life time...and if his english is not good enough then it will be more difficult. I just feel sad about it and wish my two young chidren could do better than thier father sad wuwuwu

```
$ sudo pacman -Ss accountsservice
extra/accountsservice 0.6.50-1
    D-Bus interface for user account query and manipulation
```


love to learn, love to code and love archlinux and the open source world

Offline

#14 2018-07-13 07:12:24

zhaoxin
Member
Registered: 2018-07-10
Posts: 8

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

I used Ubuntu for years, and I start to use archlinux and archlinux only now. I think archlinux will make me understand more about the Linux. Thanks for all!

Last edited by zhaoxin (2018-07-13 07:13:03)


love to learn, love to code and love archlinux and the open source world

Offline

#15 2018-07-13 07:27:01

progandy
Member
Registered: 2012-05-17
Posts: 3,174

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

If accountsservice is installed, then lightdm uses it to determine whether a user should be shown in the login screen.
If it is not installed, then /etc/lightdm/users.conf is used. You can probably add the dynamic user there to hide it without accountsservice.
Can you see a dynamic user in the output of "getent passwd"? What is the exact line?

Edit: I think it should be enought to add /sbin/nologin to the hidden shells.

hidden-shells=/bin/false /usr/bin/nologin /sbin/nologin

Last edited by progandy (2018-07-13 07:30:22)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#16 2018-07-13 08:21:36

zhaoxin
Member
Registered: 2018-07-10
Posts: 8

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

progandy wrote:

Can you see a dynamic user in the output of "getent passwd"? What is the exact line?

"systemd-timesync:*:62583:62583:Dynamic User:/:/sbin/nologin" is in the output of command `getent passwd`.

and my '/etc/lightdm/users.conf' says:

[UserList]
minimum-uid=1000
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/bin/nologin

'/etc/passwd' has no this user, but 'getent passwd' command shows this user! I see now! 'Dynamic User' is the long name of the user 'systemd-timesync'!

Let me try to guess ....

This 'systemd-timesync' account is a 'nologin' one, and its shell is '/sbin/nologin', while '/etc/lightdm/users.conf' only hide for '/bin/false' and '/usr/bin/nologin', so this strange 'Dynamic User' was displayed in my login screen...........right?

Thanks, progandy!

EDIT:

I uninstalled the 'accountsservice' and add '/sbin/nologin' to file '/etc/lightdm/user.conf', this problem is solved too:

[UserList]
minimum-uid=1000
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/bin/nologin /sbin/nologin

Last edited by zhaoxin (2018-07-13 08:36:57)


love to learn, love to code and love archlinux and the open source world

Offline

#17 2018-07-13 09:00:56

zhaoxin
Member
Registered: 2018-07-10
Posts: 8

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

Maybe making a LFS is what I should do to learn Linux.


love to learn, love to code and love archlinux and the open source world

Offline

#18 2018-07-13 10:00:01

loqs
Member
Registered: 2014-03-06
Posts: 6,173

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

@progandy any ideas why accountservice is showing Dynamic User even though Dynamic User has a shell of /sbin/nologin ?

Offline

#19 2018-07-13 10:27:38

progandy
Member
Registered: 2012-05-17
Posts: 3,174

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

@loqs: accountsservice does hide the Dynamic User. It detects that the basename is nologin and ignores the path, so it doesn't matter if the shell is set to /some/strange/path/nologin.

fhdk wrote:

Installing the package accountsservice removes the strange Dynamic User

sudo pacman -Syu accountsservice

You can use lightdm without accountsservice, though. In that mode lightdm checks for absolute paths and not basenames and the /sbin/nologin entry was missing from the lightdm users.conf configuration.

Last edited by progandy (2018-07-13 10:29:53)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#20 2018-07-13 10:33:38

loqs
Member
Registered: 2014-03-06
Posts: 6,173

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

@progandy see post #16 zhaoxin fixed the issue by uninstalling accountservice then adding /sbin/nologin to hidden shells.

Offline

#21 2018-07-13 11:11:27

progandy
Member
Registered: 2012-05-17
Posts: 3,174

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

zhaoxin wrote the problem is solved "too". I read that as accountsservice worked. Then he tried it with hidden shells instead and that worked as well.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#22 2018-07-14 09:52:01

sp_omer
Member
Registered: 2018-07-14
Posts: 1
Website

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

After I did an upgrade with -Syu I ended up with this Dynamic User at login screen as well. None of these worked for me. First tried installing accountsservice, didn't help. I'm not using lightdm so I had to try alternative for KDE and it worked.

Open /etc/sddm.conf file and edit section [Users] by adding these lines:
HideUsers=systemd-timesync
HideShells=/bin/false /usr/bin/nologin /sbin/nologin


Hope it helps someone.

Last edited by sp_omer (2018-07-14 11:15:01)

Offline

#23 2018-08-29 07:32:37

TomaszGasior
Member
From: Poland
Registered: 2017-06-03
Posts: 14
Website

Re: [SOLVED] How to get 'Dynamic User' out of your login screen?

I created a pull request for LightDM. Maybe maintainers will merge it. In this case, systemd's dynamic users won't be shown by default.
https://github.com/CanonicalLtd/lightdm/pull/38

Last edited by TomaszGasior (2018-08-29 07:33:20)

Offline

Board footer

Powered by FluxBB