1834175 Members
2439 Online
110064 Solutions
New Discussion

Console timeout

 
SOLVED
Go to solution
Terry Thorpe
New Member

Console timeout

From a physical security point of view is there a way to create a timeout on the console login (which I have restricted to root)
Tj
4 REPLIES 4
Deepak Extross
Honored Contributor
Solution

Re: Console timeout

Terry,
You can set the environment variable TMOUT to the number of seconds of idle time before the session times out.
For example,
export TMOUT=60
will log the user off after a minute of idle time.
Corthouts Carlo
Valued Contributor

Re: Console timeout

Hi,

With Posix-sh you can set the variable 'TMOUT' to have the terminate if a command is not entered within the prescribed number of seconds af issuing the PS1 prompt.

Default value is 0 so it never exits.
Deepak Extross
Honored Contributor

Re: Console timeout

By the way, if you're using c-shell, the csh equivalent of
export TMOUT=60
is
set autologout=1

You can put this in your startup file (.profile or .login), and it will be applicable whether you login at the console or from any other terminal.
David Burgess
Esteemed Contributor

Re: Console timeout

I assume you are talking about a text based console and that you have created /etc/securetty with an entry that says console.

To log root out after a specific time you can set the TMOUT variable in roots .profile :-

No Shell Timeout
----------------

TMOUT=0
export TMOUT

Shell Timeout After 3 Minutes
-----------------------------

TMOUT=180
export TMOUT

I've used this in CDE where I have done su - from myself to root. root's shell times out and log's me out leaving me back in my previous shell.

Hope this helps,

Dave.