Last Failed Login

Hi,

Would appreciate it if someone could shed me some light here as I'm yet to find any related information in this forum with regards to my problem.

Basically, I would like to display "Last Unsuccessful login" information when a user successfully logs-in to the system. I can't seem to find any answer from the web or on this site. Wondering if anyone has any solution to this.

I have both Solaris 8 & 10, and would very much like to show the failed login attempt on both platforms.

Any help is much appreciated.

Unsuccessful login attempts after five consecutive failures are logged in the file /var/adm/loginlog, only if the file /var/adm/loginlog exists and is owned by root, group sys, and has read and write permissions only for root. Follow this procedure to create and configure the file /var/adm/loginlog for unsuccessful login attempt logging:

Log in (or su) as root.

Enter the command touch /var/adm/loginlog.

Enter the command chown root /var/adm/loginlog.

Enter the command chgrp sys /var/adm/loginlog.

Enter the command chmod 600 /var/adm/loginlog.

The following is an example entry written into /var/adm/loginlog.

adm:/dev/pts/9:Tue May 5 21:07:49 1998

This entry indicates that a user attempted to log in as user adm on port /dev/pts/9 on May 5 at 9:07 P.M.

Hi Awadhesh,

Unfortunately, this is not what I am really looking for. I've already set this up on the boxes I have. What I really want is the "Unsuccessful Login" the same way a "Successful Login" is showed when a user login to the system.

SunOS 5.8

login:
Password:
Last login: Tue Aug 7 10:18:39 from 192.168.81.19
$

I recall during my days when using AIX/HP or SCO UNIX, the latest unsuccessful login attempt is shown as the user login to the system.