Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


su - login times out but $ login does not - why?

Posted on 2009-07-13
Medium Priority
Last Modified: 2013-12-16
I login using ssh as a regular user then su - to gain root access. after 5 minutes unattended the # exits to $ and I have to log in again. This also happens to users who su admin. How can I stop this?
I have set the TCP_keepalive = yes.

System is RedHat 4 ELsmp, no firewall, nothing fancy in the way.
Question by:Bstafford51
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
LVL 48

Expert Comment

ID: 24843538
unset TMOUT

or check /etc/profile or .bash_profile to see where TMOUT is set.
LVL 10

Expert Comment

ID: 24843570
The timeout is a system default to protect itself.  It is meant to logout a user that  has stepped away from his terminal so others can not have root access to the system.  While this can be changed, as Tintin instructed, I would not recommend it.  
LVL 68

Expert Comment

ID: 24843609

check whether the TMOUT variable is set ( echo $TMOUT ) in the shell environment of 'root' (or 'admin').


ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

LVL 68

Expert Comment

ID: 24843619
I think I should click 'refresh' more often ...

Author Comment

ID: 24843700
thanks for the reply.

I could not unset TMOUT as it is read only.

/etc/profile and /root/.bash_profile do not have a TMOUT entry.

I seem to remember something about an idle time out command but cann't find it agian. Any more ideas.
LVL 48

Accepted Solution

Tintin earned 2000 total points
ID: 24843767
TMOUT might also be set in /etc/default/* or /etc/bash*


Author Comment

ID: 24844386
Thanks, that did it. THe odd thing is I have two systems that are supposed to be identical but the /etc/bash and bashrc are not.

Well it works thanks again

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question