Red Hat Bugzilla – Bug 118855
I can't see "Last login" message after logged via ssh
Last modified: 2007-11-30 17:10:38 EST
After install Fedora 1 on my server I can't see "Last login" message
after logged via ssh. In RH 7.3 there was no problem with this. I see
this message when log lacally.
In sshd_config there is PrintLastLogin Yes.
I've looked through mailing list, newsgroup and forums but without any
Steps to Reproduce:
1. Log via ssh
2. Look at screen
Bug known upstream, see:
Workaround: chmod a+r /var/log/lastlog
The bug exists also on Debian sarge with ssh 3.6.1p2-12, but there the
lastlog file is already world readable, so the problem doesn't occur.
The file /var/log/lastlog by default seems to have 600 permissions
The program finger consults this file to find the date/time of a
user's last login (unless the user is currently logged in). This
means that, unless you give world read permission on this file, a
second symptom will be that fingering any user not presently logged
in will yield "Never logged in."
(This took me a while to track down because I erroneously assumed
finger just read /var/log/wtmp.)