Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-07-13
7
Medium Priority
?
206 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
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

885 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