diff options
Diffstat (limited to 'man5/utmp.5')
-rw-r--r-- | man5/utmp.5 | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/man5/utmp.5 b/man5/utmp.5 index 62febabef..a0450caa8 100644 --- a/man5/utmp.5 +++ b/man5/utmp.5 @@ -116,49 +116,49 @@ struct utmp { This structure gives the name of the special file associated with the user's terminal, the user's login name, and the time of login in the form of -.BR time (2). +.MR time 2 . String fields are terminated by a null byte (\[aq]\e0\[aq]) if they are shorter than the size of the field. .P The first entries ever created result from -.BR init (1) +.MR init 1 processing -.BR inittab (5). +.MR inittab 5 . Before an entry is processed, though, -.BR init (1) +.MR init 1 cleans up utmp by setting \fIut_type\fP to \fBDEAD_PROCESS\fP, clearing \fIut_user\fP, \fIut_host\fP, and \fIut_time\fP with null bytes for each record which \fIut_type\fP is not \fBDEAD_PROCESS\fP or \fBRUN_LVL\fP and where no process with PID \fIut_pid\fP exists. If no empty record with the needed \fIut_id\fP can be found, -.BR init (1) +.MR init 1 creates a new one. It sets \fIut_id\fP from the inittab, \fIut_pid\fP and \fIut_time\fP to the current values, and \fIut_type\fP to \fBINIT_PROCESS\fP. .P -.BR mingetty (8) +.MR mingetty 8 (or -.BR agetty (8)) +.MR agetty 8 ) locates the entry by the PID, changes \fIut_type\fP to \fBLOGIN_PROCESS\fP, changes \fIut_time\fP, sets \fIut_line\fP, and waits for connection to be established. -.BR login (1), +.MR login 1 , after a user has been authenticated, changes \fIut_type\fP to \fBUSER_PROCESS\fP, changes \fIut_time\fP, and sets \fIut_host\fP and \fIut_addr\fP. Depending on -.BR mingetty (8) +.MR mingetty 8 (or -.BR agetty (8)) +.MR agetty 8 ) and -.BR login (1), +.MR login 1 , records may be located by \fIut_line\fP instead of the preferable \fIut_pid\fP. .P When -.BR init (1) +.MR init 1 finds that a process has exited, it locates its utmp entry by .IR ut_pid , sets @@ -172,7 +172,7 @@ and .I ut_time with null bytes. .P -.BR xterm (1) +.MR xterm 1 and other terminal emulators directly create a \fBUSER_PROCESS\fP record and generate the \fIut_id\fP by using the string that suffix part of the terminal name (the characters @@ -185,12 +185,12 @@ will mark it as \fBDEAD_PROCESS\fP on exiting and it is advised that they null \fIut_line\fP, \fIut_time\fP, \fIut_user\fP, and \fIut_host\fP as well. .P -.BR telnetd (8) +.MR telnetd 8 sets up a \fBLOGIN_PROCESS\fP entry and leaves the rest to -.BR login (1) +.MR login 1 as usual. After the telnet session ends, -.BR telnetd (8) +.MR telnetd 8 cleans up utmp in the described way. .P The \fIwtmp\fP file records all logins and logouts. @@ -201,17 +201,17 @@ Furthermore, the terminal name \fB\[ti]\fP with username \fBshutdown\fP or \fBreboot\fP indicates a system shutdown or reboot and the pair of terminal names \fB|\fP/\fB}\fP logs the old/new system time when -.BR date (1) +.MR date 1 changes it. \fIwtmp\fP is maintained by -.BR login (1), -.BR init (1), +.MR login 1 , +.MR init 1 , and some versions of -.BR getty (8) +.MR getty 8 (e.g., -.BR mingetty (8) +.MR mingetty 8 or -.BR agetty (8)). +.MR agetty 8 ). None of these programs creates the file, so if it is removed, record-keeping is turned off. .SH FILES @@ -277,7 +277,7 @@ Unlike various other systems, where utmp logging can be disabled by removing the file, utmp must always exist on Linux. If you want to disable -.BR who (1), +.MR who 1 , then do not make utmp world readable. .P The file format is machine-dependent, so it is recommended that it be @@ -330,19 +330,19 @@ ut.ut_tv.tv_usec = tv.tv_usec; .\" .SH BUGS .\" This man page is based on the libc5 one, things may work differently now. .SH SEE ALSO -.BR ac (1), -.BR date (1), -.BR init (1), -.BR last (1), -.BR login (1), -.BR logname (1), -.BR lslogins (1), -.BR users (1), -.BR utmpdump (1), -.BR who (1), -.BR getutent (3), -.BR getutmp (3), -.BR login (3), -.BR logout (3), -.BR logwtmp (3), -.BR updwtmp (3) +.MR ac 1 , +.MR date 1 , +.MR init 1 , +.MR last 1 , +.MR login 1 , +.MR logname 1 , +.MR lslogins 1 , +.MR users 1 , +.MR utmpdump 1 , +.MR who 1 , +.MR getutent 3 , +.MR getutmp 3 , +.MR login 3 , +.MR logout 3 , +.MR logwtmp 3 , +.MR updwtmp 3 |