If I run lastlog with the option -l and a range, I get
# lastlog -u 1000-
Username         Port     From             Latest
nfsnobody                                  **Never logged in**
However, I specify a uid within the range, I get
# lastlog -u loris
Username         Port     From             Latest
loris            pts/34   160.45.11.110    Tue Jul 26 15:32:45 +0200 2022
The user is also not shown if I just run lastlog without any options - only a bunch of system users are shown.
Specifying a range used to work correctly. Does anyone have any idea what might be going on? The problem occurs on CentOS 7.9.2009.
/etc/passwdor though some other authentication scheme? It appears thatlastloguses the password file, notgetent./etc/passwdis used when a uid range is specified.getentis used when a username is specified./etc/passwd, but using a range to obtain them worked up until recently (a CentOS update may however have changed things). Do you have a source for the information about/etc/passwdbeing used with a uid range?strace lastlog -u 1000-to look at system calls. I might have misread the trace. I usesssdto authenticate against AD and I do see the sss socket being opened. I have enumerate turned off so a uid search would not turn up anything. Have you changed yourldapconfiguration recently?lastlogdatabase can be queried. Weirdly everything is working correctly on a second similarly configured server (see also unix.stackexchange.com/questions/712138/…).