Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

who command displays a large number instead of login date+time #318

Open
ComputerDoktor opened this issue Nov 9, 2024 · 4 comments
Open

Comments

@ComputerDoktor
Copy link

ComputerDoktor commented Nov 9, 2024

who am i
pi pts/1 3891110120997922972 (10.0.0.54)
expected output
pi pts/1 2024-11-09 21:38 (10.0.0.54)
Raspbian GNU/Linux 12 (bookworm)
kernel version
Linux hostname 6.6.51+rpt-rpi-v6 #1 Raspbian 1:6.6.51-1+rpt3 (2024-10-08) armv6l GNU/Linux
coreutils 9.1-1 armhf GNU core utilities

See also
https://unix.stackexchange.com/questions/773180/debian-bookworm-on-rpi-4-who-command-displays-a-large-number-instead-of-login

@lurch
Copy link
Collaborator

lurch commented Nov 10, 2024

How strange. I've just tried this on multiple Pis, and the output always looks correct, e.g.

$ who
pi5                   2024-11-07 19:05
pi5      tty1         2024-11-07 19:05
pi5      pts/0        2024-11-10 19:55 (192.168.0.84)

Is your system up to date with APT? Do you continue to see this odd behaviour after rebooting your Pi?

@ComputerDoktor
Copy link
Author

The odd behaviour is only on my Raspi Zero W running 32-Bit Raspi-OS. On my Raspberry Pi 3 Model B Plus Rev 1.3 running 64-Bit-OS (kernel 6.6.51+rpt-rpi-v8 aarch64) the output is as expected.
Yes, my system is up to date with apt, and I do observe the odd behaviour after rebooting.

@lurch
Copy link
Collaborator

lurch commented Nov 11, 2024

Thanks for the additional info! I can confirm that I also see strange date values in the who output on 32-bit Raspberry Pi OS:

$ who
piconnect              1970-01-11 17:52
piconnect tty1         1970-01-02 10:19
piconnect pts/1        -8710239812825976095 (10.3.31.135)

I tried investigating it a bit, and utmpdmp does display the correct dates:

$ utmpdump /run/utmp 
Utmp dump of /run/utmp
[2] [00000] [~~  ] [reboot  ] [~           ] [6.6.51+rpt-rpi-v7   ] [0.0.0.0        ] [2024-11-11T08:53:15,933134+00:00]
[7] [00662] [    ] [piconnect] [            ] [                    ] [0.0.0.0        ] [2024-11-11T08:53:26,924748+00:00]
[1] [00053] [~~  ] [runlevel] [~           ] [6.6.51+rpt-rpi-v7   ] [0.0.0.0        ] [2024-11-11T08:53:27,458497+00:00]
[7] [00789] [tty1] [piconnect] [tty1        ] [                    ] [0.0.0.0        ] [2024-11-11T08:53:28,119980+00:00]
[7] [01462] [ts/1] [piconnect] [pts/1       ] [10.3.31.135         ] [10.3.31.135    ] [2024-11-11T08:57:48,717537+00:00]
[8] [01591] [ts/2] [        ] [pts/2       ] [                    ] [10.3.31.135    ] [2024-11-11T09:30:25,722244+00:00]

And so I suspect that this might be because of https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64937

As this is an upstream Debian bug, I suspect your only course of action is to wait for the upstream 32-bit Debian fixes to trickle down into 32-bit Raspberry Pi OS. But I'll leave this bug open for a little while in case @spl237 or @XECDesign or @pelwell have any ideas / suggestions.

@ComputerDoktor
Copy link
Author

Thanks for your information. As I understand the gnu bug report you related to, utmp will be replaced by a systemd interface in order to become y2038 compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants