"Last login: " Where is it stored?
Where is the "last login" variable stored? it appears when logging in on a local terminal or threw ssh remotely.
|
on my debian system the command /urs/bin/lastlog does the trick for me, though it does not tell me where it is stored, only shows the details for each user
|
These are usually logged in:
/var/log/wtmp /var/log/utmp /var/log/lastlog The location could be different depending on the distro. These are data files so you can only view the results with the last and lastlog commands edit: these files are also used by the w and who commands |
you can use strace to see where your particular distro looks...
for example, check last like: Code:
strace last Code:
open("/var/log/wtmp", O_RDONLY) = 3 |
Quote:
|
All times are GMT -5. The time now is 06:34 PM. |