Solved

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

Posted on 2009-07-13
7
202 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

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…
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

791 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