Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fwtmp(1M) — HP-UX 5.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acct(1M)

acctcms(1M)

acctcom(1)

acctcon(1M)

acctmerg(1M)

acctprc(1M)

acctsh(1M)

runacct(1M)

ed(1)

acct(2)

acct(5)

utmp(5)

FWTMP(1M)

NAME

fwtmp, wtmpfix − manipulate connect accounting records

SYNOPSIS

/usr/lib/acct/fwtmp [−ic]
/usr/lib/acct/wtmpfix [files]

HP-UX COMPATIBILITY

Level: HP-UX/EXTENDED

Origin: System V

DESCRIPTION

Fwtmp

Fwtmp reads from the standard input and writes to the standard output, converting binary records of the type found in wtmp to formatted ASCII records.  The ASCII version is useful to enable editing, via ed(1), bad records or general purpose maintenance of the file. 

The argument −ic is used to denote that input is in ASCII form, and output is to be written in binary form.  (The arguments i and c are independent, respectively specifying ASCII input and binary output, thus −i is an ASCII to ASCII copy and −c is a binary to binary copy). 

Wtmpfix

Wtmpfix examines the standard input or named files in wtmp format, corrects the time/date stamps to make the entries consistent, and writes to the standard output.  A − can be used in place of files to indicate the standard input.  If time/date corrections are not performed, acctcon1 will fault when it encounters certain date-change records. 

Each time the date is set, a pair of date change records are written to /usr/adm/wtmp.  The first record is the old date denoted by the string old time placed in the line field and the flag OLD_TIME placed in the type field of the <utmp.h> structure.  The second record specifies the new date and is denoted by the string new time placed in the line field and the flag NEW_TIME placed in the type field.  Wtmpfix uses these records to synchronize all time stamps in the file.  Wtmpfix nullifies date change records when writing to the standard output by setting the time field of the <utmp.h> structure in the old date change record equal to the time field in the new date change record.  In this way, wtmpfix and acctcon1 will not factor in a date change record pair more than once. 

In addition to correcting time/date stamps, wtmpfix will check the validity of the name field to ensure that it consists solely of alphanumeric characters or spaces.  If it encounters a name that is considered invalid, it will change the login name to INVALID and write a diagnostic to the standard error.  In this way, wtmpfix reduces the chance that acctcon1 will fail when processing connect accounting records. 

FILES

/etc/wtmp
/usr/include/utmp.h

SEE ALSO

acct(1M), acctcms(1M), acctcom(1), acctcon(1M), acctmerg(1M), acctprc(1M), acctsh(1M), runacct(1M), ed(1), acct(2), acct(5), utmp(5). 

DIAGNOSTICS

Wtmpfix generates these diagnostics:

Cannot make temporary: xxx
failed to make temp file

Input truncated at offset: xxx
missing half of date pair

New date expected at offset: xxx
missing half of date pair

Cannot read from temp: xxx
some error reading

Bad file at offset: xxx
ut_type out of range character only checked)

Out of core
malloc fails. (Saves table of date changes)

No dtab
software error (not seen yet)

BUGS

Fwtmp generates no errors, even on garbage input. 

Hewlett-Packard  —  last mod. May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026