Improve company productivity with a Business Account.Sign Up

x
?
Solved

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

Posted on 2009-07-13
7
Medium Priority
?
209 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
This installment of Make It Better gives Media Temple customers the latest news, plugins, and tutorials to make their Grid shared hosting experience that much smoother.
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

587 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