shadow-maint/shadow

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.

zeha commented

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

Thanks!