Friends!!
I need your help. Where can i change/set the last login details as below in aix 5.3. And how to do that to get the results as exactly below
login as: mbpops mbpops@xx.28.3.24's password:
Last unsuccessful login: Mon Nov 22 14:32:27 GMT 2010 on ssh from 10.132.5.129
Last login: Mon Nov 22 14:44:54 GMT 2010 on ssh from 10.132.5.129
###########################################################################
# #
# #
# This computer system, its network and data contained therein is the #
# property of the xxxxxxxxxxxxxxxxxx Group. Access to this computer and #
# network is restricted to persons and programs authorised by the Group #
# only. Access by others is prohibited and unauthorised, and is wrongful #
# under law. Do not proceed if you are not authorised. Any unauthorised #
# access will be prosecuted to the fullest extent of the law. #
# #
# #
###########################################################################
Files Reference
utmp, wtmp, failedlogin File Format
Purpose
Describes formats for user and accounting information.
Description
The utmp file, the wtmp file, and the failedlogin file contain records with user and accounting information.
When a user attempts to logs in, the login program writes entries in two files:
* The /etc/utmp file, which contains a record of users logged into the system.
* The /var/adm/wtmp file (if it exists), which contains connect-time accounting records.
On an invalid login attempt, due to an incorrect login name or password, the login program makes an entry in:
* The /etc/security/failedlogin file, which contains a record of unsuccessful login attempts.
The records in these files follow the utmp format, defined in the utmp.h header file.
###########################################################################
# #
# #
# This computer system, its network and data contained therein is the #
# property of the xxxxxxxxxxxxxxxxxx Group. Access to this computer and #
# network is restricted to persons and programs authorised by the Group #
# only. Access by others is prohibited and unauthorised, and is wrongful #
# under law. Do not proceed if you are not authorised. Any unauthorised #
# access will be prosecuted to the fullest extent of the law. #
# #
# #
###########################################################################
Just to ask the obvious, you don't get the last login information right now?
When I log in I get exactly:
Using username "purdym".
This is a private computer facility. Access to the facility must be
specifically authorized. If you are not authorized, your continued
access and further inquiry expose you to criminal and/or civil
proceedings.
Authenticating with public key "imported-openssh-key" from agent
Last unsuccessful login: Sun Jul 25 07:44:34 CDT 2010 on ssh from miles_xp
Last login: Tue Nov 23 12:33:28 CST 2010 on /dev/pts/5 from miles_xp
The herald is my doing. The last three lines are printed from the SSH daemon. Are you asking how to get SSHD to display that information?
It does not work when I ssh from my PC, it works when I ssh from another server.
Add the ansi colour escape sequence to your SSHD banner file:
This is a private computer facility. Access to the facility must be
specifically authorized. If you are not authorized, your continued
access and further inquiry expose you to criminal and/or civil
proceedings.
^[[36;40;1m
Thanks for the reply friends.
i am using both ssh & telnet friends. i want to display the unsuccessful login attempts and last login date, time details before the banner display. i don't want to do any formatting stuff friends. Hope u are understand y query.
Apologize for the inconvenience friends. The sample o/p shared here is taken from somewhere in net. Now i need to set/configure the same for all my production systems.
something is funny, you should be seeing that information already.
For SSH, I think the option you want is:
PrintLastLog yes
Verify that this is your sshd config file.
I suspect it won't help though, it sounds like something is suppressing the last login information for every service. I get last login information for every service I tried: ssh, rlogin, telnet.
You run AIX correct?
What does the entry in /etc/inittab look like for telnet?