Configuring shell auto logout features
This document (7007128) is provided subject to the disclaimer at the end of this document.
Novell Open Workgroup Suite Small Business Edition (NOWS SBE)
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Desktop 11
SUSE Linux Enterprise Desktop 10
test@linux:~> echo $SHELL
test@linux:~> export TMOUT=30
test@linux:~> timed out waiting for input: auto-logout
In this example the user "tux" switched to the account of the user "test" by using su -. After 30 seconds of inactivity the user gets logged out.
Using the TMOUT variable access to remote hosts can be closed as well:
Last login: Mon Nov 1 14:02:13 2010 from linux1.testenv.site
linux2:~ # timed out waiting for input: auto-logout
Connection to 192.168.66.10 closed.
On ksh a warning is issued after reaching the seconds specified by TMOUT, 60 seconds after this warning the shell exits.
Bash and ksh settings are read from /etc/profile, /etc/profile.local, $HOME/.profile, $HOME/.bashrc and $HOME/.kshrc. As /etc/profile may get updated by YaST2 Online Update, its recommended to place own changes into /etc/profile.local.
Note: The TMOUT option applies to the active shell only. In case a user switches from one shell to another, like having /bin/bash as login shell and then start /bin/ksh, the timeout will first close the ksh. It needs another full cycle to close the remaining shell. Same applies to ssh connections.
The variable for csh (/bin/csh) is called autologout and specifies minutes of inactivity. By default this feature only applies to environments where no X is running, see man csh for details.
To temporarily disable the environment variable use the command "unset" which is available for the mentioned shells. As this command may get issued by any user to unset the TMOUT value it should not be considered to increase the security of the system.
This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7007128
- Creation Date:01-NOV-10
- Modified Date:30-APR-12
- NovellOpen Enterprise ServerOpen Workgroup Suite - Small Business Edition (NOWS SBE)
- SUSESUSE Linux Enterprise DesktopSUSE Linux Enterprise Real Time ExtensionSUSE Linux Enterprise Server
Did this document solve your problem? Provide Feedback