Logpatch v1.0 surgically patches utmp/utmpx, wtmp/wtmpx & lastlog. Very portable, a high quality tool. It preserves the file’s times and truncates entries at the end of the file.
You can download it from the following link: https://packetstormsecurity.com/files/download/26226/logpatch.c
Source: https://packetstormsecurity.com/files/26226/logpatch.c.html

