nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

timer for logging out from PuTTy

This is a discussion on timer for logging out from PuTTy within the Shell scripting forums, part of the Development/Scripting category; hey all, Is there a way to set a timer that after x minutes/hours to log out from PuTTy by ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Linux answers from nixCraft.


Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 14-08-2008, 05:03 PM
eawedat's Avatar
Senior Member
User
 
Join Date: May 2008
Location: Palestine
OS: Kn0ck3D
Posts: 149
Thanks: 1
Thanked 2 Times in 2 Posts
Rep Power: 2
eawedat is on a distinguished road
Send a message via MSN to eawedat
Post timer for logging out from PuTTy

hey all,
Is there a way to set a timer that after x minutes/hours to log out from PuTTy by the command "logout" ?

thanks.
Reply With Quote
  #2 (permalink)  
Old 15-08-2008, 05:12 PM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 708
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

Yes, you need to set TMOUT variable

Linux logged out a user automatically
__________________
Rocky Jr.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
  #3 (permalink)  
Old 15-08-2008, 06:25 PM
eawedat's Avatar
Senior Member
User
 
Join Date: May 2008
Location: Palestine
OS: Kn0ck3D
Posts: 149
Thanks: 1
Thanked 2 Times in 2 Posts
Rep Power: 2
eawedat is on a distinguished road
Send a message via MSN to eawedat
Cool hey

hey rockdalinux
thanks for trying to help!

i have edited the file /etc/bashrc
and searched for the word by --> :/TMOUT
Pattern not found :TMOUT

And the second thing i am not root--(normal user),, i wish to apply this logout on-my-self!


thanks again.
Reply With Quote
  #4 (permalink)  
Old 16-08-2008, 03:28 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You need to append TMOUT=300. This will set for all users. I suggest add something as follows to your ~/.bash_profile or ~/.bashrc
Code:
echo 'export TMOUT=300' >> ~/.bash_profile
Now logout and login again.

300 seconds == 5 minuets to auto logout.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #5 (permalink)  
Old 16-08-2008, 04:15 AM
eawedat's Avatar
Senior Member
User
 
Join Date: May 2008
Location: Palestine
OS: Kn0ck3D
Posts: 149
Thanks: 1
Thanked 2 Times in 2 Posts
Rep Power: 2
eawedat is on a distinguished road
Send a message via MSN to eawedat
Default

thx smart-brain
Reply With Quote
Reply

Tags
.bashrc , /etc/profile , bash , shell , shell auto logout , tmout


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Inactivity timer for lighttpd petu Web servers 0 11-03-2008 12:49 PM
Logging File Accesses madz Shell scripting 2 08-11-2006 01:54 AM
Download with timer? marinm Shell scripting 6 22-01-2006 11:53 PM
MRTG stops logging nathan86 Linux software 12 23-03-2005 07:14 PM
FreeBSD putty home key problem chiku All about FreeBSD/OpenBSD/NetBSD 2 03-02-2005 05:10 PM


All times are GMT +5.5. The time now is 10:16 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38