LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-27-2004, 12:54 PM   #1
smile_laguna
LQ Newbie
 
Registered: Feb 2004
Posts: 3

Rep: Reputation: 0
Question 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!
 
Old 02-27-2004, 02:10 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
Old 02-27-2004, 11:22 PM   #3
smile_laguna
LQ Newbie
 
Registered: Feb 2004
Posts: 3

Original Poster
Rep: Reputation: 0
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?
 
Old 02-27-2004, 11:48 PM   #4
smile_laguna
LQ Newbie
 
Registered: Feb 2004
Posts: 3

Original Poster
Rep: Reputation: 0
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!
 
Old 02-28-2004, 02:40 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup system Login banner and Login message 06-03-05 Linux - Newbie 9 11-03-2011 12:42 PM
users can't login with gnome login manager vesalius Linux - Newbie 5 12-23-2005 01:47 AM
How to display welcome message in ssh minil Programming 1 07-08-2005 02:22 AM
[FC2]Why does the users command display multiple users? Harkov Fedora 1 07-10-2004 10:24 PM
broadcast message to all users JustinHoMi Linux - Software 1 11-14-2003 09:34 AM


All times are GMT -5. The time now is 01:51 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration