CHKWTMP(8)

πŸ’– CHKWTMP β€” the chkwtmp(8) girlies' edition πŸ’–

okay bestie, so this is a page from the System Manager's Manual and it's about a lil program called chkwtmp. it's giving forensic detective energy, honestly. let's get into it πŸ•΅οΈβ™€οΈβœ¨


🌸 NAME 🌸

chkwtmp β€” check wtmp file deleted entries

like. it checks the wtmp file. for deleted entries. that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

chkwtmp looks for data deleted from wtmp

no flags, no arguments, no nothing. she just looks. iconic behaviour, no cap πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie πŸ“

chkwtmp examines the file /var/log/wtmp for entries which have been overwritten (containing only null-bytes). yep β€” overwritten. gone. ghosted. the entry literally got replaced with nothing but null-bytes and now it's just sitting there like πŸ’€

if such entries are found, the program displays the timestamps of the entries before and after the deleted entry β€” which lowkey gives you an idea of when the entry was deleted. a little timeline reconstruction moment, main character detective energy fr fr πŸ”₯

and here's the practical bit: chkwtmp needs to be able to read /var/log/wtmp. normally this file is world-readable, so no special privileges are required β€” no sudo, no drama, you can just run it 🫢


πŸŽ€ FILES πŸŽ€

  • /var/log/wtmp β€” database of logins and logouts. that's her. that's the file. the whole reason we're here πŸ’œ

🌈 SEE ALSO 🌈

go read those too, they're the extended universe iykyk ✨


⭐ LIMITATIONS ⭐

okay now the fine print, and pls actually read this one bestie:

  • An entry is recognized as overwritten if the time-information has been overwritten with null-bytes.
so like β€” the detection is specifically keyed on the time info being nulled out. that's the trigger. noted. πŸ“
  • This program was originally designed to run on SunOS 4.x systems. On other systems the output is undefined.
🚨 okay this is the big one 🚨 she's an OG SunOS 4.x girl, and on anything else the output is undefined β€” meaning nobody's promising you anything sensible comes out. no guessing, no cap. run it elsewhere at your own risk, babe 😭

and that's the whole page!! so cute, so short, so useful. go check your wtmp, be safe, hydrate πŸ’–

written under the System Manager's Manual, dated Oct 23, 2021 β€” mwah, love u, bye πŸ‘‘