Difference between revisions of "Bash"
From Briki
(No difference)
|
Revision as of 09:47, 6 September 2006
Force autologout of root and other privileged account shells after inactivity
Add to /etc/profile:
if [ `id -u` -lt 500 ]; then
# Override console timeout for root and other system users
TMOUT_ROOT=3600
if [ -n "$TMOUT" ]; then
if [ "$TMOUT" -eq "0" -o "$TMOUT" -gt "$TMOUT_ROOT" ]; then
TMOUT=$TMOUT_ROOT
fi
else
TMOUT=$TMOUT_ROOT
fi
fi
type declare > /dev/null 2>&1 && declare -r TMOUT