shadow-maint / shadow

Upstream shadow tree
Other
287 stars 227 forks source link

CRUX Linux - No wtmp records written by /bin/login #1026

Closed markusheinz closed 2 weeks ago

markusheinz commented 2 weeks ago

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.

zeha commented 2 weeks ago

Seems like your OS vendor needs to finish the integration of pam_lastlog2. wtmp is going away.

TimB87 commented 2 weeks ago

Then we should be good to go: https://git.crux.nu/ports/core/commit/06cef256612a72afb15086da26ff8ba6ac19938b

Cheers!

hallyn commented 2 weeks ago

Thanks!