LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Display Last Login message for users (http://www.linuxquestions.org/questions/linux-newbie-8/display-last-login-message-for-users-151204/)

smile_laguna 02-27-2004 12:54 PM

Display Last Login message for users
 
I've installed Redhat 9 and I found that only root has the last login message like "Last login: <when> from <where>" but not the users.

How can I enable this for all the users?

Thanks!

druuna 02-27-2004 02:10 PM

Must be a setting in /etc/login.defs.

Check man login.defs, especially this part:

Quote:

LASTLOG_ENAB (boolean)
If yes, and if the /var/log/lastlog file exists, then a successful user
login will be recorded to this file. Furthermore, if this option is enabled
then the times of the most recent successful and unsuccessful logins will be
displayed to the user upon login. The unsuccessful login display will be
suppressed if FAILLOG_ENAB is not enabled. If ``hushlogin'' conditions are
in effect, then both the successful and unsuccessful login information will
be suppressed.
Hope this helps.

smile_laguna 02-27-2004 11:22 PM

Thanks very much!!

I've put that in login.defs after your kind instructions, but it is still not effective yet. What should I do next?

smile_laguna 02-27-2004 11:48 PM

Ar.... I forgot to tell u one thing. I'm now trying to let the users to login via SSH. I found that only root has the Last login message but not the other users.

However, when I use the normal telnet, the message is there whoever logs in.

It seems that the login.defs isn't the one to control the appearance of that message in my system. Is it the special feature RH9? Then where can I control the login behaviour?

Thanks very much again!

druuna 02-28-2004 02:40 AM

If telnet shows the information and ssh does not, then login.defs is ok. You probably need to look at the ssh config files.

Change this entry in /etc/ssh/sshd_config:

ChallengeResponseAuthentication no
to
#ChallengeResponseAuthentication no

That should do the trick for ssh.


All times are GMT -5. The time now is 07:30 PM.