Solved

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

Posted on 2009-07-13
7
203 Views
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.
0
Comment
Question by:Bstafford51
[X]
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
7 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 24843538
unset TMOUT

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

Expert Comment

by:sublifer
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.  
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24843609
Hi,

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

wmp



0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
LVL 68

Expert Comment

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

Author Comment

by:Bstafford51
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.
0
 
LVL 48

Accepted Solution

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

0
 

Author Comment

by:Bstafford51
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
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

738 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