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
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture i686
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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]
Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 23 June 2009, 00:23 GMT
lastlog file should not be deleted (like btmp for example), instead of this if you what you need is to clear entries just write ": > /var/log/lastlog" or "cat /dev/null > /var/log/lastlog"

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...
Comment by Aaron Griffin (phrakture) - Tuesday, 23 June 2009, 16:54 GMT
Did you play with your pam configuration recently? It works fine here on two different machines
Comment by - (zaggynl) - Wednesday, 24 June 2009, 09:24 GMT
Actually I haven't, apart form updating Arch daily.
Comment by Giulio Fidente (giulivo) - Friday, 03 July 2009, 17:36 GMT
same problem here, haven't investigated so much but I do get **Never logged in** for every user, on two machines
Comment by Simon Malinge (Tapi) - Wednesday, 15 July 2009, 18:35 GMT
I have the same problem on one of my machines. I thought it was because I made a mistake, but I installed arch on a new computer today, and the freshly installed system has the same problem.
Comment by Aaron Griffin (phrakture) - Thursday, 16 July 2009, 20:56 GMT
Do me a favor: Run "bash -l" and then check lastlog. Random guess is that you may not be using a login shell
Comment by Simon Malinge (Tapi) - Friday, 17 July 2009, 17:59 GMT
Running lastlog still returns no results after having run "bash -l".
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).
Comment by Alessandro Doro (adoroo) - Saturday, 18 July 2009, 00:30 GMT
ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-4.1.4.NEWS:
- 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.

Loading...