FS#15217 - [shadow] lastlog showing **Never logged in** for every user even after succesful remote logins
Attached to Project:
Arch Linux
Opened by - (zaggynl) - Monday, 22 June 2009, 19:29 GMT
Last edited by Allan McRae (Allan) - Saturday, 18 July 2009, 11:39 GMT
Opened by - (zaggynl) - Monday, 22 June 2009, 19:29 GMT
Last edited by Allan McRae (Allan) - Saturday, 18 July 2009, 11:39 GMT
|
Details
Description: lastlog showing **Never logged in** for every
user, I login remote to my Arch box every day remotely.
Additional info: * package version(s) 4.1.3.1-1 * config and/or log files etc.: default installation. Steps to reproduce: Tried removing lastlog, reinstalling, restarting sshd, relogging. Active thread: http://bbs.archlinux.org/viewtopic.php?id=74521 |
This task depends upon
Closed by Allan McRae (Allan)
Saturday, 18 July 2009, 11:39 GMT
Reason for closing: Fixed
Additional comments about closing: shadow-4.1.4.1-1 in [testing]
Saturday, 18 July 2009, 11:39 GMT
Reason for closing: Fixed
Additional comments about closing: shadow-4.1.4.1-1 in [testing]
This is not related to shadow, is related to pam, the with module lastlog, this module open a file in O_RDWR, without O_CREAT , so if the file don't exist...
As sshd invocates bash as "-bash", it enables bash login shell mode, which should be sufficient to record login date into the lastlog file.
And actually, it is :
- running md5sum on /var/log/lastlog shows different hashes each time I log in.
- running "strings /var/log/lastlog" shows different ptys each time I launch an (additional) ssh client.
So the problem does not seem to come from login "recording", but from the lastlog command itself.
Indeed, launching "strace lastlog" shows that, despite succeeding in opening /var/log/lastlog, lastlog never issues a read() call on it, whereas an older version that I use on another computer does (shadow 4.1.2.1-2).
- lastlog
* Fix regression causing empty reports.
I'm affeced by this bug and I can confirm that lastlog is fixed in shadow-4.1.4.1.