<?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/"
		>
<channel>
	<title>Comments on: Stupid Linux Tricks: Basic Server Hardening (Debian&#160;Lenny)</title>
	<atom:link href="http://almosteffortless.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/feed/" rel="self" type="application/rss+xml" />
	<link>http://almosteffortless.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/</link>
	<description></description>
	<lastBuildDate>Wed, 10 Mar 2010 01:15:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jalfrock</title>
		<link>http://almosteffortless.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/comment-page-1/#comment-69376</link>
		<dc:creator>jalfrock</dc:creator>
		<pubDate>Tue, 12 Jan 2010 01:20:33 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1353#comment-69376</guid>
		<description>@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:<br />
DPkg::Pre-Invoke{&#8220;mount -o remount,exec /tmp&#8221;;};<br />
DPkg::Post-Invoke {&#8220;mount -o remount /tmp&#8221;;};</p>
<p>(This remounts /tmp exec before running dpkg, then re-remounts it noexec when it&#8217;s done.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vivek</title>
		<link>http://almosteffortless.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/comment-page-1/#comment-68916</link>
		<dc:creator>vivek</dc:creator>
		<pubDate>Sat, 22 Aug 2009 04:29:51 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1353#comment-68916</guid>
		<description>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://almosteffortless.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/comment-page-1/#comment-68874</link>
		<dc:creator>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-68874</guid>
		<description>[...] 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'Connell</title>
		<link>http://almosteffortless.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/comment-page-1/#comment-68684</link>
		<dc:creator>Timothy O'Connell</dc:creator>
		<pubDate>Wed, 20 May 2009 13:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=1353#comment-68684</guid>
		<description>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
<pre>/usr/bin/mesg n</pre>
<p> to root&#8217;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:
<pre>stdin: is not a tty
stdin: is not a tty
stdin: is not a tty</pre>
<p> It didn&#8217;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&#8217;t do its thing because it didn&#8217;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&#8217;s <em>.bashrc</em>:
<pre>if [ ! -f $USER ]
    then /usr/bin/mesg n
fi</pre>
<p>It&#8217;s sort of ugly, but it gets the job done: if you&#8217;re starting an interactive session and you&#8217;ve got a <strong>$USER</strong> variable, then you get your <em>mesg</em> sent to <em>n</em>. If you&#8217;re not, then you don&#8217;t. Easy-peasy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
