Thursday, September 20, 2012

How to find the users login history

last command will give login history for a specific username. If we don’t give any argument for this command, it will list login history for all users. By default this information will read from /var/log/wtmp file. The output of this command contains the following columns:
  • User name
  • Tty device number
  • Login date and time
  • Logout time
  • Total working time

root@Linuxhowto.in:/home/mysqluser# last
mysqluse           pts/0        27.251.126.196   Thu Sep 20 03:14      still logged in
ubuntu               pts/2        14.140.226.234   Wed Sep 19 14:18 - 14:42  (00:24)
mysqluse           pts/2        27.4.210.1           Tue Sep 18 12:13 - 12:26  (00:12)
mysqluse           pts/1        27.4.210.1           Tue Sep 18 11:50 - 12:25  (00:35)
ubuntu               pts/0        14.140.226.234   Tue Sep 18 10:33 - 12:35  (02:01)

login history of some particular user
root@ Linuxhowto.in:/home/mysqluser# last mysqluser
mysqluse            pts/0        27.251.126.196   Thu Sep 20 03:14   still logged in
mysqluse            pts/0        27.251.126.196   Wed Sep 19 04:30 - 09:41  (05:11)
mysqluse            pts/2        27.4.210.1           Tue Sep 18 12:13 - 12:26  (00:12)
mysqluse            pts/1        27.4.210.1           Tue Sep 18 11:50 - 12:25  (00:35)
mysqluse            pts/0        27.251.126.196   Tue Sep 18 09:12 - 09:57  (00:45)
mysqluse            pts/5        27.251.126.196   Fri Sep  7 08:23 - 09:40  (01:17)

1 comment:

  1. المنارة بحمد الله تعالي افضل شركة تنظيف كنب بالرياض نقوم نحن شركة الطيب تنظيف الكنب بافضل الوسائل الحديثة التي تميزنا عن باقي الشركات الموجودة في الرياض بالكامل شركة تنظيف كنب بالرياض شركة المنارة تقوم بتنظيف الكنب من البقع التي لا يمكن ازالتها بالمساحيق العادية فنحن نستخدم افضل المساحيق و افضل مواد التنظيف التي تقوم بتنظيف الاقمشة واعادة لمعانها و

    ReplyDelete