Novell Home

My Favorites

Close

Please to see your favorites.

Users logging into the server with ssh are not recorded in lastlog

This document (7014881) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11

Situation

Message in /var/log/messages when someone tries to login via ssh.  The login works correctly and ssh allows the user in.  However the lastlog is not updated. This means that information about users' last logins are missing. 

Mar 22 02:00:26 linux-p3qt sshd[8372]: Accepted keyboard-interactive/pam for test from 172.16.176.1 port 50055 ssh2
Mar 22 02:00:26 linux-p3qt sshd[8372]: lastlog_filetype: Couldn't stat /var/log/lastlog: No such file or directory
Mar 22 02:00:26 linux-p3qt sshd[8372]: lastlog_openseek: /var/log/lastlog is not a file or directory!
Mar 22 02:00:26 linux-p3qt sshd[8372]: lastlog_filetype: Couldn't stat /var/log/lastlog: No such file or directory
Mar 22 02:00:26 linux-p3qt sshd[8372]: lastlog_openseek: /var/log/lastlog is not a file or directory!

Resolution

The lastlog file does not exist. Create the file with these commands: 
# touch /var/log/lastlog
# chgrp utmp /var/log/lastlog
# chmod 664 /var/log/lastlog

Disclaimer

This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7014881
  • Creation Date:09-APR-14
  • Modified Date:09-APR-14
    • SUSESUSE Linux Enterprise Server

Did this document solve your problem? Provide Feedback