CRUX Linux - No wtmp records written by /bin/login
markusheinz opened this issue · 3 comments
- Operating System: CRUX Linux 3.7
- Affected Versions: shadow-4.13.2, shadow-4.15.2
- Also Installed: util-linux 2.40.1, linux-pam 1.6.1
When logging in via a tty (text login, no X) no wtmp record is written. The "who" command lists the login, but the "last" command does not.
I took a look at the source of /bin/login in shadow-4.13.2 and noticed that it relies on pam_lastlog to write the wtmp record. But on this operating system only pam_lastlog2 is available. I looked at its source code as well and it does not write a wtmp record either.
A test with shadow-4.15.2 did not write a wtmp record as well.
How can /bin/login be made to write a wtmp record in this setup?
Background: On machines with no X installed or frequent tty logins the login history is missing if no wtmp records are written.
Seems like your OS vendor needs to finish the integration of pam_lastlog2. wtmp is going away.
Then we should be good to go: https://git.crux.nu/ports/core/commit/06cef256612a72afb15086da26ff8ba6ac19938b
Cheers!
Thanks!