public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Conditional TMOUT variable
@ 2008-11-30  9:48 Mick
  2008-11-30 10:27 ` Neil Bothwick
  0 siblings, 1 reply; 3+ messages in thread
From: Mick @ 2008-11-30  9:48 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

Hi All,

I've exported TMOUT=1200 to make sure an absent minded colleague does not 
leave his console logged in as root and walk away.

This has the desired effect - except that when I am su'd in via SSH it also 
kicks in and logs me out midstream whatever I have been doing at the time.  
Is there something to take account of user activity before allowing TMOUT to 
kick in?
-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-user] Conditional TMOUT variable
  2008-11-30  9:48 [gentoo-user] Conditional TMOUT variable Mick
@ 2008-11-30 10:27 ` Neil Bothwick
  2008-12-01 18:01   ` Mick
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Bothwick @ 2008-11-30 10:27 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 682 bytes --]

On Sun, 30 Nov 2008 09:48:15 +0000, Mick wrote:

> I've exported TMOUT=1200 to make sure an absent minded colleague does
> not leave his console logged in as root and walk away.
> 
> This has the desired effect - except that when I am su'd in via SSH it
> also kicks in and logs me out midstream whatever I have been doing at
> the time. 

Where do you set this, in the profile/bashrc? You could test $SSH_TTY
before setting the variable, so it is not set for SSH logins. I use a
similar method to give a different prompt for SSH sessions.

[[ -n "${SSH_TTY}" ]] || export TMOUT=1200

 
-- 
Neil Bothwick

Always proofread carefully to see if you any words out.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-user] Conditional TMOUT variable
  2008-11-30 10:27 ` Neil Bothwick
@ 2008-12-01 18:01   ` Mick
  0 siblings, 0 replies; 3+ messages in thread
From: Mick @ 2008-12-01 18:01 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]

On Sunday 30 November 2008, Neil Bothwick wrote:
> On Sun, 30 Nov 2008 09:48:15 +0000, Mick wrote:
> > I've exported TMOUT=1200 to make sure an absent minded colleague does
> > not leave his console logged in as root and walk away.
> >
> > This has the desired effect - except that when I am su'd in via SSH it
> > also kicks in and logs me out midstream whatever I have been doing at
> > the time.
>
> Where do you set this, in the profile/bashrc? 

No, only in /root/.bashrc.

> You could test $SSH_TTY 
> before setting the variable, so it is not set for SSH logins. I use a
> similar method to give a different prompt for SSH sessions.
>
> [[ -n "${SSH_TTY}" ]] || export TMOUT=1200

Thanks, I entered this and I think it works (not sure I spent enough time 
online to be certain).  Time will tell, ha!
-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-01 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-30  9:48 [gentoo-user] Conditional TMOUT variable Mick
2008-11-30 10:27 ` Neil Bothwick
2008-12-01 18:01   ` Mick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox