Bug 118855

Summary: I can't see "Last login" message after logged via ssh
Product: [Fedora] Fedora Reporter: Marcin Zajaczkowski <mszpak>
Component: opensshAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED UPSTREAM QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: bart.martens
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-22 01:17:42 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Marcin Zajaczkowski 2004-03-21 13:31:05 EST
Hi,

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
results.

Szpak


How reproducible:
Alwayes

Steps to Reproduce:
1. Log via ssh
2. Look at screen
Comment 1 Bart Martens 2004-03-22 01:17:42 EST
openssh-server-3.6.1p2-19

Bug known upstream, see:
http://bugzilla.mindrot.org/show_bug.cgi?id=463

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.
Comment 2 Michael Rodgers 2004-05-16 21:29:57 EDT
The file /var/log/lastlog by default seems to have 600 permissions
(-rw-------).  

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.)

--Mike