Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Change wtmp

Frequent Advisor

Change wtmp

Question> How to change wtmp to something else.
Michael Schulte zur Sur
Honored Contributor

Re: Change wtmp


into a dog?

Frequent Advisor

Re: Change wtmp

Nope, Not necessarily into a dog. But a maintenance proc other than the normal accounting one.

Aside from the one I use:

The following example converts the /var/adm/wtmp binary file records to ASCII records:

# /usr/sbin/acct/fwtmp < /var/adm/wtmp
system boot 0 20000 0000 652547412 Jan 5 11:10:12 1994
system boot 0 10062 0123 652547412 Jan 5 11:10:12 1994
bcheck bl 6 80000 0000 652547413 Jan 5 11:10:13 1994
cat cr 16 80000 0000 652547414 Jan 5 11:10:14 1994
rc rc 17 80000 0000 652547485 Jan 5 11:11:25 1994
hoffman co console 147 70000 0001 652547495 Jan 5 11:11:35 1994
hoffman p4 pty/ttyp4 2156 80000 0002 652650095 Jan 6 15:41:35 1994
LOGIN p4 pty/ttyp4 2140 60000 0000 652649075 Jan 6 15:24:35 1994
LOGIN p4 pty/ttyp4 2140 80000 0000 652649086 Jan 6 15:24:46 1994

To correct a /var/adm/wtmp file:

Change your working directory to /var/adm/acct/nite.

Use the fwtmp command to create an ASCII version of the wtmp file.

# fwtmp < wtmp.0617 > wtmp_temp

Edit the temporary file and remove the corrupted records.

Use the fwtmp command to recreate the wtmp file.

# fwtmp -ic < wtmp_temp > wtmp.0617


By the way. This was just off the wall question.
Mic V.
Esteemed Contributor

Re: Change wtmp


Hmm, I guess I'm not seeing exactly where you're going. The answer to "how to turn it into something else" is, I think, "programming." But I doubt that's exactly the answer you wanted! :-)

Were you talking about some kind of statistical analysis of logins, Excel format, ...? Automation of the tasks listed?

What kind of a name is 'Wolverine'?