timeoutd/timeoutd.8

80 lines
3 KiB
Groff
Raw Normal View History

2009-01-05 07:11:58 +01:00
.TH TIMEOUTD 8
.SH NAME
timeoutd \- Enforce idle and session time restrictions
.SH SYNOPSIS
2008-04-02 02:15:25 +02:00
.B /usr/sbin/timeoutd [ user tty ]
2009-01-05 07:11:58 +01:00
.SH DESCRIPTION
2008-04-02 02:15:25 +02:00
.B timeoutd
enforces the time restrictions specified in
.IR /etc/timeouts .
2009-01-05 07:11:58 +01:00
When invoked in daemon mode (without any parameters) timeoutd backgrounds
2008-04-02 02:15:25 +02:00
itself, then scans \fB/var/run/utmp\fR every minute and checks \fB/etc/timeouts\fR
2009-01-05 07:11:58 +01:00
for an entry which matches that user, based on:
.IP "\- The current day and time"
.IP "\- The tty that the user is currently logged in on"
.IP "\- The user's login ID"
.IP "\- Any primary or secondary groups the user is in"
.PP
If a match is found, the limits specified for that entry are enforced by
2008-04-02 02:15:25 +02:00
sending a
.B SIGHUP
(Hangup signal) to the user's login process, followed
after 5 seconds by a
.B SIGKILL
(Sure kill signal) to ensure the user is
2009-01-05 07:11:58 +01:00
logged out.
.PP
2008-04-02 02:15:25 +02:00
Where possible,
.B timeoutd
will send a warning to the user
every minute for 5 minutes (or other time specified in
.IR /etc/timeouts )
2009-01-05 07:11:58 +01:00
before logging them out. Warnings are not sent for exceeded idle limits,
as this would count as activity on the terminal.
.PP
Timeoutd currently allows limits to be set on idle time as well as amount
of time logged in per session and per day.
.PP
When calculating idle time, any activity on the terminal, either incoming
(such as typing) or outgoing (such as information displayed on the screen)
2008-04-02 02:15:25 +02:00
is counted as activity. This is to prevent log-offs during file transfers.
2009-01-05 07:11:58 +01:00
.PP
2008-04-02 02:15:25 +02:00
Under Linux,
.B timeoutd
detects when a serial line is in SLIP mode and disables
2009-01-05 07:11:58 +01:00
idle time limit checking (as the last read/write times for the tty are
not updated).
.PP
Debug information, error messages and notification of users who have been
timed out are all recorded via syslog (facility=DAEMON).
.PP
2008-04-02 02:15:25 +02:00
.B timeoutd
can also be invoked by login to check whether a user is allowed
2009-01-05 07:11:58 +01:00
to login at that time, or whether they have exceeded their daily time limit.
When invoked in this way, by passing a username and tty (without the leading
2008-04-02 02:15:25 +02:00
/dev) on the command line,
.B timeoutd
returns one of the following exit codes:
2009-01-05 07:11:58 +01:00
.IP "0 User is allowed to login
.IP "1 Fatal error
.IP "5 Incorrect command line format
.IP "10 User has exceeded maximum daily connect time
.IP "20 User not permitted to login at this time on this tty
.IP "30 Internal error checking user name (probably invalid user name)
.SH FILES
2008-04-02 02:15:25 +02:00
.IP "/etc/timeouts \- lists valid login times and idle/session time restrictions
.IP "/var/run/utmp \- current login sessions
.IP "/var/log/wtmp \- for calculating total logged in time for current day
2009-01-05 07:11:58 +01:00
.SH BUGS
Sessions which end in the current day but started before midnight
will not be considered when calculating total daily logged in time for a
user on that day. This will not, however, affect checking of the
session limit, which should limit such problems. It does
mean that a user could conceivably exceed their maximum daily time
by one extra session if they log on just before midnight.
.SH "SEE ALSO"
.BR timeouts "(5)
.SH "WRITTEN BY"
2008-04-02 02:15:25 +02:00
Orginally written by Shane Alderton <shanea@bigpond.net.au>, updated by
Dennis Stampfer <seppy@debian.org>.