Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using CentOS 6. How can I configure it so the system notifies the user, upon successful login, of the date and time of the last login? Is that possible?

share|improve this question
    
Doesn't ssh do that by default? –  jordanm Jan 10 '13 at 17:49
add comment

1 Answer

You can the pam_lastlog module to display the date of last login upon successful logon.

You can refer to the pam_lastlog man page for more options, but to accomplish what you want just add the following to the /etc/pam.d/login file

session required pam_lastlog.so nowtmp
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.