<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Linux / UNIX Automatically Log BASH / TCSH / SSH Users Out After a Period of Inactivity</title>
	<atom:link href="http://www.cyberciti.biz/faq/linux-unix-login-bash-shell-force-time-outs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cyberciti.biz/faq/linux-unix-login-bash-shell-force-time-outs/</link>
	<description>Every answer asks a more beautiful question.</description>
	<lastBuildDate>Fri, 19 Mar 2010 08:35:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Vivek Gite</title>
		<link>http://www.cyberciti.biz/faq/linux-unix-login-bash-shell-force-time-outs/comment-page-1/#comment-40992</link>
		<dc:creator>Vivek Gite</dc:creator>
		<pubDate>Tue, 31 Mar 2009 20:15:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/?p=3379#comment-40992</guid>
		<description>@MikeM

Thanks for sharing your script.</description>
		<content:encoded><![CDATA[<p>@MikeM</p>
<p>Thanks for sharing your script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MikeM</title>
		<link>http://www.cyberciti.biz/faq/linux-unix-login-bash-shell-force-time-outs/comment-page-1/#comment-40990</link>
		<dc:creator>MikeM</dc:creator>
		<pubDate>Tue, 31 Mar 2009 16:55:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/?p=3379#comment-40990</guid>
		<description>We wanted something a bit more user explicit (log out idle users but not the boss(s)). The list of users below are exempt. Set this script in crontab to run every 10 minutes. With an idle of time of 30, the idled sessions will be no more than 39 minutes idle.
Here is our script;
&lt;pre&gt;
#! /usr/bin/awk -f

BEGIN {
system(&quot;who -u &#124; sort +5 &gt; /tmp/loginfile&quot;);
system(&quot;echo User Sessions Killed &gt; /tmp/killedlogins&quot;);
system(&quot;echo `date` &gt;&gt; /tmp/killedlogins&quot;);
while (getline = 1) &#124;&#124; (timearray[2] &gt;= 30)) &amp;&amp;
($1 != &quot;root&quot;) &amp;&amp;
($1 != &quot;user2&quot;) &amp;&amp;
($1 != &quot;user2&quot;) &amp;&amp;
($1 != &quot;user4&quot;) &amp;&amp;
($1 != &quot;lastuser&quot;)) { {
system(&quot;ps -ef &#124; grep &quot; $1 &quot; &#124; awk &#039;{print $2}&#039; &#124; xargs kill -KILL&quot;);
print $1, &quot;[Idle &quot; $6 &quot;] Session terminated from &quot; $8 &gt;&gt; &quot;/tmp/killedlogins&quot;;
};
};
};
}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>We wanted something a bit more user explicit (log out idle users but not the boss(s)). The list of users below are exempt. Set this script in crontab to run every 10 minutes. With an idle of time of 30, the idled sessions will be no more than 39 minutes idle.<br />
Here is our script;</p>
<pre>
#! /usr/bin/awk -f

BEGIN {
system("who -u | sort +5 &gt; /tmp/loginfile");
system("echo User Sessions Killed &gt; /tmp/killedlogins");
system("echo `date` &gt;&gt; /tmp/killedlogins");
while (getline = 1) || (timearray[2] &gt;= 30)) &amp;&amp;
($1 != "root") &amp;&amp;
($1 != "user2") &amp;&amp;
($1 != "user2") &amp;&amp;
($1 != "user4") &amp;&amp;
($1 != "lastuser")) { {
system("ps -ef | grep " $1 " | awk '{print $2}' | xargs kill -KILL");
print $1, "[Idle " $6 "] Session terminated from " $8 &gt;&gt; "/tmp/killedlogins";
};
};
};
}</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boopalan</title>
		<link>http://www.cyberciti.biz/faq/linux-unix-login-bash-shell-force-time-outs/comment-page-1/#comment-40633</link>
		<dc:creator>Boopalan</dc:creator>
		<pubDate>Sat, 07 Mar 2009 02:49:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/?p=3379#comment-40633</guid>
		<description>i wont hardware networking /linux /ccna</description>
		<content:encoded><![CDATA[<p>i wont hardware networking /linux /ccna</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marz</title>
		<link>http://www.cyberciti.biz/faq/linux-unix-login-bash-shell-force-time-outs/comment-page-1/#comment-40483</link>
		<dc:creator>marz</dc:creator>
		<pubDate>Wed, 25 Feb 2009 21:23:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/?p=3379#comment-40483</guid>
		<description>while date ; do sleep 10 ; done

or 

watch -n 10 date

;)</description>
		<content:encoded><![CDATA[<p>while date ; do sleep 10 ; done</p>
<p>or </p>
<p>watch -n 10 date</p>
<p>;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liju</title>
		<link>http://www.cyberciti.biz/faq/linux-unix-login-bash-shell-force-time-outs/comment-page-1/#comment-40481</link>
		<dc:creator>Liju</dc:creator>
		<pubDate>Wed, 25 Feb 2009 15:19:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/?p=3379#comment-40481</guid>
		<description>Good tips .. :-)</description>
		<content:encoded><![CDATA[<p>Good tips .. :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yoander</title>
		<link>http://www.cyberciti.biz/faq/linux-unix-login-bash-shell-force-time-outs/comment-page-1/#comment-40480</link>
		<dc:creator>yoander</dc:creator>
		<pubDate>Wed, 25 Feb 2009 14:58:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/?p=3379#comment-40480</guid>
		<description>nice tip</description>
		<content:encoded><![CDATA[<p>nice tip</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.086 seconds -->
