21zoo Labs - Assorted Stuff

Remove or Clear Last Login Information on Linux

Posted — Dec 6, 2017

In particular, the information returned by lastlog and last/lastb

# for lastlog

rm -f /var/log/lastlog && touch /var/log/lastlog


# for last/lastb

rm /var/log/wtmp && touch /var/log/wtmp
rm /var/log/btmp && touch /var/log/btmp