Table of Contents

NAME

SYNOPSIS

DESCRIPTION

The file declares the structures used to record information about current users in the file logins and logouts in the file and last logins in the file The time stamps of date changes, shutdowns and reboots are also logged in the file. These files can grow rapidly on busy systems, daily or weekly rotation is recommended. If any of these files do not exist, it is not created. These files must be created manually and are normally maintained in either the script or the script (See #define _PATH_UTMP "/var/run/utmp" #define _PATH_WTMP "/var/log/wtmp" #define _PATH_LASTLOG "/var/log/lastlog"

#define UT_NAMESIZE 8 #define UT_LINESIZE 8 #define UT_HOSTSIZE 16

struct lastlog { time_t ll_time;
char ll_line[UT_LINESIZE];
char ll_host[UT_HOSTSIZE];
};

struct utmp { char ut_line[UT_LINESIZE];
char ut_name[UT_NAMESIZE];
char ut_host[UT_HOSTSIZE];
time_t    ut_time;
}; Each time a user logs in, the program looks up the user’s in the file If it is found, the timestamp of the last time the user logged in, the terminal line and the hostname are written to the standard output. (Providing the login is not see The program then records the new login time in the file After the new record is written , the file is opened and the record for the user inserted. This record remains there until the user logs out at which time it is deleted. The file is used by the programs and Next, the program opens the file and appends the user’s record. The same record, with an updated time stamp is later appended to the file when the user logs out. (See The file is used by the programs and In the event of a date change, a shutdown or reboot, the following items are logged in the file. A system reboot or shutdown has been initiated. The character is placed in the field and or in the field (See and The system time has been manually or automatically updated. (See The command name is recorded in the field In the field the character indicates the time prior to the change, and the character indicates the new time.

FILES

The The The

SEE ALSO

HISTORY

A and file format appeared in The file format appeared in


Table of Contents