Re: setting TMOUT in /etc/profile

From: Holger.VanKoll@SWISSCOM.COM
Date: Fri Nov 01 2002 - 10:19:43 EST


correct, now it works
 
thx a lot

        -----Original Message-----
        From: Paul LaMadeleine [mailto:plamadeleine@LIGHTBRIDGE.COM]
        Sent: Friday, November 01, 2002 4:12 PM
        To: aix-l@Princeton.EDU
        Subject: Re: setting TMOUT in /etc/profile
        
        
        This looks like it's running the export in a sub shell and it
goes away when the sub shell is closed.
        
        I would rewrite it to something like this:
        
        

                if [ "`who am i | awk '{print $1}'`" == "root" ]; then
echo hvk;
                export TMOUT=60; readonly TMOUT; echo $TMOUT; echo OK;
fi

                Hope this helps,
        
                Paul
        
        At 03:54 PM 11/1/2002 +0100, you wrote:
        
        

                Hello,
                
                why does TMOUT have a value of 0 after logging in here :

                
                root@0-tvgicsc1 169# grep TMOUT /etc/profile
                [ `who am i|read a b; echo $a` = tgdvkho1 ] && (echo hvk
; export TMOUT=60 ; readonly TMOUT ;echo $TMOUT ; echo ok)
                root@0-tvgicsc1 170# telnet localhost
                Trying...
                Connected to loopback.
                
                ...
                
                login: tgdvkho1
                tgdvkho1's Password:
                Last unsuccessful login: Fri Nov 1 15:33:45 NFT 2002 on
/dev/pts/8 from loopback
                Last login: Fri Nov 1 15:33:49 NFT 2002 on /dev/pts/8
from loopback
                
                hvk
                60
                ok
                tgdvkho1@0-tvgicsc1 166# echo $TMOUT
                0
                tgdvkho1@0-tvgicsc1 167#
                
                It works manually:
                tgdvkho1@0-tvgicsc1 169# TMOUT=20
                tgdvkho1@0-tvgicsc1 170#
                Shell will time out in 60 seconds.
                ksh: Timed out waiting for input.
                Connection closed.
                
                A find /etc -type f |xargs grep TMOUT returns only
profile
                
                Regards, Holger



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:18 EDT