[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: Logging ttys off
From: Julian Assange <proff () suburbia ! net>
Date: 1996-12-02 6:28:34
[Download RAW message or body]
> Julian Assange writes:
> > > I'm looking for a "foolproof" way of logging out lines that
> > > are in use. The only real information available at the time I
> > > need to do this is the user's utmp entry.
> >
> > What is your objective? there may be another solution.
>
> Time accounting. If session limits run out, or the user runs out
> of time, or the session runs into a time period in which logins
> on specific ttys are not allowed, then I need to log the user
> off and cleanup any background processes they may have started
> during the session.
You could look at a program I wrote a while called "hidleho" that
does just this (among other things), although it is a little dated
now. (ftp://ftp.suburbia.net/pub/proff/original/chalace+hidleho).
Also Dial-Up_Utils on sunsite in /pub/linux somewhere, similar and
actively maintained.
#/etc/hidleho.cnf is the configuration file for hildeho.
#
# the uid variable defines what user hidleho should run as for its
# maintenance functions. you must ensure that all of
# hidleho's config files and directories are owned by uid
Uid hidleho
#
# TtyUid varible defines what user owns the vacant ttys.
TtyUid root
#
# UserBase variable defines the directory to hold the per-user config
# directories and sub-files.
UserBase /usr/hidleho
#
# GroupBase variable defines the directory to hold the group-wide config
# directories and sub-files.
GroupBase /usr/hidleho
# DeniedMsg File printed to tty when a user is denied access ('-' flag)
DeniedMsg /etc/hidleho.denied
# BorrowGrace Grace for logoff when lines are full.
BorrowGrace 2
#
# the def_term variable defines what the enviromental variable TERM should
# be set to if hildeho is unable to obtain the terminal type
# from the remote connection, /etc/gettydefs or ~/.termtype.
Term vt100
#
#the ttys variable defines the ttys to monitor if the users "B" flag
# is set. Also effects the "C" flag.
ttys ttyS0 ttyS1 ttyS2 ttyS3 ttyS4
#
#the weights variable defines the multiplicative weight applied to
# the effective calculated call time for the ttys specified
# by ttys:
weights 1 1 1 1 1
#the warn_t variable defines the t- times at which the user will be warned
# of approching total timeout (up to 10 parameters)
warn_t 10 3 2 1
#the warn_i variable defines the t- times at which the user will be warned
# of approching idle timeout (up to 10 parameters)
warn_i 3 2 1
#
# Description of general parameters:
#
# Name = user name, or the pseudo-name "default:", or a
# /etc/group name terminated with a trailing "+".
# Total = total number of minutes the user is allowed on-line.
# InIdle = how long for idle timeout, if no user input
# OutIdle = how long for idle timeout, if no system output
# TimeLim = the amount of time granted per time segmant
# TimePer = the size (in time) of a time period/segmant
# Exclude = minutes to exclude the user for on logout (B & C)
# Flags = lower case alphabetical = FALSE, upper case = TRUE
# I = send user Information at login time
# i = do not "
# W = send disconnection warnings to terminal
# w = do not "
# K = kill all users tasks system wide
# k = kill all users tasks tty wide
# A = ask user for terminal type
# a = do not "
# B = allow user to exist on borrowed time
# b = do not "
# C = total timeout only on a Configured ttys:
# c = total timeout on all ttys
# E = exclusive idle on. if (idle_in || idle_out) idle()
# e = " off. if (idle_in && idle_out) idle()
# T = timer on.
# t = timer off, just exec shell after auth/term/info.
# N = permit negative time left
# n = do not permit negative time left (timeleft = 0 if negative)
# U = unlimited negative time
# u = negative time limited to -TimeLim
# - = prevent user/group from loging in.
# + = allow user/group to login.
#
# Shell = filename to execute
# n.b an "*" specified in any but the Name parameter field acts as a place
# holder.
#Name Total InIdle OutIdle TimeLim TimePer Exclude Flags Shell
#
default: 30 10 10 2h 1d 0 uNeTIWKABC+ /bin/tcsh
unpaid+ 30 10 10 4h 28d 10 KEc /usr/local/bin/mshell
donate+ 45 15 15 2h 1d 5 * /bin/tcsh
sponsor+ 45 20 15 3h 1d 4 * /bin/tcsh
oldsponsor+ 90 20 15 3h 1d 4 * /bin/tcsh
staff+ 52w 2h 2h 0 0 0 eTiWkaBC+ /bin/tcsh
proff * * * * * * AI /bin/tcsh
register 55 8 8 0 0 0 EkabcA /usr/local/lbin/guest_login
guest 55 8 8 0 0 0 EkabcA /usr/local/lbin/guest_login
chaltest 4 * * 0 0 0 EkabcAi /home/chaltest/login
xfer 2h * * 0 0 0 eIkAbc /usr/local/lbin/wares
motronic 130 * * 5h 1d * * *
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic