


Sample outputs: root pts/1 10.1.6.120 Tue Jan 7 16:43 still logged in

Use last or lastb command to display listing of last logged in users: Now overwrite the file using any one of the following command: First make a backup of /var/log/lastlog, just in case using the cp command: Simply overwrite the /var/log/lastlog file. The nixCraft or author is not responsible for data loss. WARNING! The following commands will remove login data entries for all users. Want to clear lastlog record of a user named vivek? Try the following command as the root user: Removing the last login info for a user account Please note that if the user has never logged in the message “**Never logged in**” will be displayed instead of the port and time. Simply type the lastlog command as follows: Task: Display last login information for user under Linux The Following information is printed using the lastlog command: The lastlog command shows the most recent login of all users or of a given user. Linux remove or clear the Last login information using lastlog command
