Types of inactivity timeouts in Solaris
There are 2 types of inactivity timeouts in Solaris.
- login session inactivity: This is before you log in and you are at the Login: prompt.
- shell session inactivity: This is after you login and the session is left unattended. This applies to only bash and ksh shells.
How to avoid Inactivity Timeout in Solaris
We will discuss here both types of inactivity timeouts and how you can extend them as per your needs.
1. Login session inactivity timeouts
Find the entry in the /etc/default/login file which defines the login inactivity details.
# TIMEOUT sets the number of seconds (between 0 and 900) to wait before # abandoning a login session. # #TIMEOUT=300
The patameter TIMEOUT defines the number of seconds the login process will wait on an attempted login for a response to the login prompt. For example, if you have the TIMEOUT value set to 120, then when you “telnet”, you will have 120 seconds, or 2 minutes, to enter a login name before it closes the connection.
2. The shell session inactivity timeouts
The TMOUT environment variable is what controls Korn and Bash shell inactivity timeout. If it is unset, or has a value of 0, then timeout is disabled. If it is set to a value greater than zero, then the shell will terminate if a command is not entered in the specified number of seconds in the TMOUT variable.
The TMOUT variable can be set in /etc/profile for all users, or in an individual’s $HOME/.profile file.