<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Stupid Linux Tricks: Basic Server Hardening (Debian Lenny)</title>
	<atom:link href="http://trevorturk.wordpress.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevorturk.wordpress.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/</link>
	<description>A chess-playing machine of the late 18th century, promoted as an automaton but later proved a hoax.</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:13:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: jalfrock</title>
		<link>http://trevorturk.wordpress.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/#comment-867</link>
		<dc:creator><![CDATA[jalfrock]]></dc:creator>
		<pubDate>Mon, 11 Jan 2010 20:20:33 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1353#comment-867</guid>
		<description><![CDATA[@vivek:
 

 
Add the following to your /etc/apt/apt.conf:
 
DPkg::Pre-Invoke{&quot;mount -o remount,exec /tmp&quot;;};
 
DPkg::Post-Invoke {&quot;mount -o remount /tmp&quot;;};
 

 
(This remounts /tmp exec before running dpkg, then re-remounts it noexec when it&#039;s done.) ]]></description>
		<content:encoded><![CDATA[<p>@vivek:</p>
<p>Add the following to your /etc/apt/apt.conf:</p>
<p>DPkg::Pre-Invoke{&quot;mount -o remount,exec /tmp&quot;;};</p>
<p>DPkg::Post-Invoke {&quot;mount -o remount /tmp&quot;;};</p>
<p>(This remounts /tmp exec before running dpkg, then re-remounts it noexec when it&#039;s done.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vivek</title>
		<link>http://trevorturk.wordpress.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/#comment-866</link>
		<dc:creator><![CDATA[vivek]]></dc:creator>
		<pubDate>Fri, 21 Aug 2009 22:29:51 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1353#comment-866</guid>
		<description><![CDATA[If you mount /tmp with no-exec apt tends to fail since it unzips files in /tmp and runs postinstall from there.  Are you sure about this? ]]></description>
		<content:encoded><![CDATA[<p>If you mount /tmp with no-exec apt tends to fail since it unzips files in /tmp and runs postinstall from there.  Are you sure about this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bookmarks for 29.07.2009 through 03.08.2009 - mafflog</title>
		<link>http://trevorturk.wordpress.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/#comment-865</link>
		<dc:creator><![CDATA[Bookmarks for 29.07.2009 through 03.08.2009 - mafflog]]></dc:creator>
		<pubDate>Mon, 03 Aug 2009 15:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1353#comment-865</guid>
		<description><![CDATA[[...] almost effortless &#187; Stupid Linux Tricks: Basic Server Hardening (Debian Lenny) &#8211; [...] ]]></description>
		<content:encoded><![CDATA[<p>[...] almost effortless &raquo; Stupid Linux Tricks: Basic Server Hardening (Debian Lenny) &#8211; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy O&#039;Conne</title>
		<link>http://trevorturk.wordpress.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/#comment-864</link>
		<dc:creator><![CDATA[Timothy O&#039;Conne]]></dc:creator>
		<pubDate>Wed, 20 May 2009 07:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1353#comment-864</guid>
		<description><![CDATA[I realized, shortly after I added the bit about &lt;pre&gt;/usr/bin/mesg n&lt;/pre&gt; to root&#039;s &lt;em&gt;.bashrc&lt;/em&gt; that I was getting mysterious errors from non-interactive processes.
 

 
Namely, when I ran rsync via cron, I was getting emails from cron that looked like this:&lt;pre&gt;stdin: is not a tty
 
stdin: is not a tty
 
stdin: is not a tty&lt;/pre&gt; It didn&#039;t take long for me to put two and two together and realize that this was output from that &lt;em&gt;mesg&lt;/em&gt; command: it couldn&#039;t do its thing because it didn&#039;t have a tty on account of the session being a non-interactive one.
 

 
In order to silence that particular lamb, I adjusted the &lt;em&gt;mesg&lt;/em&gt; command in root&#039;s &lt;em&gt;.bashrc&lt;/em&gt;:&lt;pre&gt;if [ ! -f $USER ]
 
    then /usr/bin/mesg n
 
fi&lt;/pre&gt;
 
It&#039;s sort of ugly, but it gets the job done: if you&#039;re starting an interactive session and you&#039;ve got a &lt;strong&gt;$USER&lt;/strong&gt; variable, then you get your &lt;em&gt;mesg&lt;/em&gt; sent to &lt;em&gt;n&lt;/em&gt;. If you&#039;re not, then you don&#039;t. Easy-peasy. ]]></description>
		<content:encoded><![CDATA[<p>I realized, shortly after I added the bit about &lt;pre&gt;/usr/bin/mesg n&lt;/pre&gt; to root&#039;s <em>.bashrc</em> that I was getting mysterious errors from non-interactive processes.</p>
<p>Namely, when I ran rsync via cron, I was getting emails from cron that looked like this:&lt;pre&gt;stdin: is not a tty</p>
<p>stdin: is not a tty</p>
<p>stdin: is not a tty&lt;/pre&gt; It didn&#039;t take long for me to put two and two together and realize that this was output from that <em>mesg</em> command: it couldn&#039;t do its thing because it didn&#039;t have a tty on account of the session being a non-interactive one.</p>
<p>In order to silence that particular lamb, I adjusted the <em>mesg</em> command in root&#039;s <em>.bashrc</em>:&lt;pre&gt;if [ ! -f $USER ]</p>
<p>    then /usr/bin/mesg n</p>
<p>fi&lt;/pre&gt;</p>
<p>It&#039;s sort of ugly, but it gets the job done: if you&#039;re starting an interactive session and you&#039;ve got a <strong>$USER</strong> variable, then you get your <em>mesg</em> sent to <em>n</em>. If you&#039;re not, then you don&#039;t. Easy-peasy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

