<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pario TechnoBlob &#187; apt-get</title>
	<atom:link href="http://pario.no/tag/apt-get/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:17:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Advantages using aptitude instead of apt-get</title>
		<link>http://pario.no/2008/03/24/advantages-using-aptitude-instead-of-apt-get/</link>
		<comments>http://pario.no/2008/03/24/advantages-using-aptitude-instead-of-apt-get/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 23:08:42 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pario.no/2008/03/24/advantages-using-aptitude-instead-of-apt-get/</guid>
		<description><![CDATA[apt-get is a command-line package handling utility while aptitude is a high-level interface to the package manager. There isn&#8217;t much difference between the two except aptitude will remove unused package dependencies automatically whereas with apt-get you have to do it manually. Neither removes dependencies as that would cause problems. Dependencies are packages that are depended [...]]]></description>
			<content:encoded><![CDATA[<p><strong>apt-get</strong> is a command-line package handling utility while <strong>aptitude</strong> is a high-level interface to the package manager. There isn&#8217;t much difference between the two except aptitude will remove unused package dependencies automatically whereas with apt-get you have to do it manually. Neither removes dependencies as that would cause problems. Dependencies are packages that are depended on by other packages. You don&#8217;t want to remove them.</p>
<p>To remove unused packages with apt-get use</p>
<pre>
sudo apt-get autoremove</pre>
<p>With aptitude there is nothing to do as it&#8217;s automatic.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDgvMDMvMjQvYWR2YW50YWdlcy11c2luZy1hcHRpdHVkZS1pbnN0ZWFkLW9mLWFwdC1nZXQvPHdwdGI%2BQWR2YW50YWdlcyB1c2luZyBhcHRpdHVkZSBpbnN0ZWFkIG9mIGFwdC1nZXQ8d3B0Yj5odHRwOi8vcGFyaW8ubm88d3B0Yj5QYXJpbyBUZWNobm9CbG9i";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2008/03/24/advantages-using-aptitude-instead-of-apt-get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian backports and pinning</title>
		<link>http://pario.no/2008/02/22/debian-backports-and-pinning/</link>
		<comments>http://pario.no/2008/02/22/debian-backports-and-pinning/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 23:05:53 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[backports]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Etch]]></category>

		<guid isPermaLink="false">http://pario.no/2008/02/22/debian-backports/</guid>
		<description><![CDATA[I&#8217;m running Debian Etch because I prefer the stable Debian package tree. This is all great but the software is a little outdated compared to other distributions like Ubuntu. That is where backports come in. Backports are recompiled packages from testing (mostly) and unstable (in a few cases only, e.g. security updates), so they will [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m running Debian Etch because I prefer the stable Debian package tree. This is all great but the software is a little outdated compared to other distributions like Ubuntu. That is where backports come in. Backports are recompiled packages from testing (mostly) and unstable (in a few cases only, e.g. security updates), so they will run without new libraries (wherever it is possible) on a stable Debian distribution. They recommend you to pick out single backports which fits your needs, and not to use all backports available here.</p>
<p>Using backports is simple</p>
<ol>
<li>Add this line to your <strong>/etc/apt/sources.list</strong></li>
<pre>
deb http://www.backports.org/debian etch-backports main contrib non-free</pre>
<li>Run
<pre>
apt-get update</pre>
<p>You might get a error message</p>
<pre>
Reading package lists... Done
W: GPG error: http://www.backports.org etch-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EA8E8B2116BA136C
W: You may want to run apt-get update to correct these problems</pre>
<p>This message comes on Debian Etch because you haven&#8217;t imported the backports keyring. It&#8217;s easily fixed by running the command</p>
<pre>
apt-get install debian-backports-keyring</pre>
</li>
<li>Since all backports are deactivated by default you got to tell the package manager to use the backports repository. To install a newer version of nmap
<pre>
apt-get -t etch-backports install nmap</pre>
</li>
</ol>
<p>It is important to remember that if you forget to tell apt-get that nmap is installed from backports and run another apt-get install nmap it will remove my backports package.</p>
<p><strong>A simple solution to this is to use pinning</strong><br />
Edit <strong>/etc/apt/preferences</strong>, the file has to be created if you haven&#8217;t used pinning before</p>
<pre>
Package: nmap
Pin: release a=etch-backports
Pin-Priority: 999</pre>
<p>Now the system &#8220;remembers&#8221; that nmap is installed from the backports repository and you don&#8217;t have to worry about it anymore, nice.</p>
<p>Source: <a href="http://www.backports.org/">http://www.backports.org/</a></p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/www.backports.org\/"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDgvMDIvMjIvZGViaWFuLWJhY2twb3J0cy1hbmQtcGlubmluZy88d3B0Yj5EZWJpYW4gYmFja3BvcnRzIGFuZCBwaW5uaW5nPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2008/02/22/debian-backports-and-pinning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable DVD playback on Ubuntu 7.10</title>
		<link>http://pario.no/2008/02/04/enable-dvd-playback-on-ubuntu-710/</link>
		<comments>http://pario.no/2008/02/04/enable-dvd-playback-on-ubuntu-710/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 16:39:55 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pario.no/2008/02/04/enable-dvd-playback-on-ubuntu-710/</guid>
		<description><![CDATA[Open a terminal window. Execute the following terminal command to install the necessary packages sudo apt-get install totem-xine libxine1-ffmpeg libdvdread3 Execute the following terminal command sudo /usr/share/doc/libdvdread3/install-css.sh After you have done the above excercise, insert a DVD into your drive. Totem will open and the movie will be played.]]></description>
			<content:encoded><![CDATA[<ol>
<li>Open a terminal window.</li>
<li>Execute the following terminal command to install the necessary packages
<pre>
sudo apt-get install totem-xine libxine1-ffmpeg libdvdread3</pre>
</li>
<li>Execute the following terminal command
<pre>
sudo /usr/share/doc/libdvdread3/install-css.sh</pre>
</li>
</ol>
<p>After you have done the above excercise, insert a DVD into your drive. Totem will open and the movie will be played.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDgvMDIvMDQvZW5hYmxlLWR2ZC1wbGF5YmFjay1vbi11YnVudHUtNzEwLzx3cHRiPkVuYWJsZSBEVkQgcGxheWJhY2sgb24gVWJ1bnR1IDcuMTA8d3B0Yj5odHRwOi8vcGFyaW8ubm88d3B0Yj5QYXJpbyBUZWNobm9CbG9i";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2008/02/04/enable-dvd-playback-on-ubuntu-710/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making /tmp non-executable</title>
		<link>http://pario.no/2007/10/04/making-tmp-non-executable/</link>
		<comments>http://pario.no/2007/10/04/making-tmp-non-executable/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 06:10:27 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[fstab]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pario.no/2007/10/04/making-tmp-non-executable/</guid>
		<description><![CDATA[Many simple exploits that are used against machines, (via vulnerable PHP applications or local users, etc), rely upon being able to execute commands in /tmp. If this is a seperate partition or file system you can gain some protection by marking it non-executable. The common problem with this is that apt-get fails to work with [...]]]></description>
			<content:encoded><![CDATA[<p>Many simple exploits that are used against machines, (via vulnerable PHP applications or local users, etc), rely upon being able to execute commands in /tmp. If this is a seperate partition or file system you can gain some protection by marking it non-executable. The common problem with this is that apt-get fails to work with such a setup.</p>
<p>When you mount a partition there are many flags that can be used, two interesting ones are:</p>
<pre>noexec
nosetuid</pre>
<p>(A full list can be read as part of <tt>man mount</tt>).</p>
<p>The two flags are explained fully in the man page for mount, but briefly:</p>
<ul>
<li>noexec
<ul>
<li>Do not allow execution of any binaries on the mounted file system.</li>
</ul>
</li>
<li>nosuid
<ul>
<li>Do not allow set-user-identifier or  set-group-identifier bits to take effect.</li>
</ul>
</li>
</ul>
<p>Mounting filesystems with these flags set raises the bar a little, but it <em>doesn&#8217;t stop</em> files from being   executed.  The Linux linker and loader will permit binaries to be run:</p>
<pre># Make /tmp non-executable
root@earth:~# mount -o remount,noexec /tmp

# Copy an executable into it
root@earth:~# cp /bin/ls /tmp
root@earth:~# chmod 755 /tmp/ls

# Test it - the execution should fail.
root@earth:~# /tmp/ls
bash: /tmp/ls: Permission denied

# But .. what's this?  It still runs?
root@earth:~# /lib/ld-linux.so.2 /tmp/ls
Mail  public_html  

# cleanup
root@earth:~# rm /tmp/ls
root@earth:~# mount -o remount,exec /tmp</pre>
<p>With that in mind you might wonder what the point is?  Well it foils any simplistic attack that relies upon   putting a script in /tmp and running it.  If they&#8217;ve got shell access they can probably figure it out, but an   automated tool would be foiled &#8211; for the moment.</p>
<p>To make your system have a non-executable <tt>/tmp</tt> partition you must edit the way that it is mounted in the   file <tt>/etc/fstab</tt>.  Find the line that contains <tt>/tmp</tt> and change the <tt>defaults</tt> to read   <tt>nosuid,noexec</tt> instead.</p>
<p>For example this is my updated <tt>/etc/fstab</tt> file:</p>
<pre>/dev/sda3       /tmp              ext3  noexec,nosuid           0       2</pre>
<p>This will take effect the next time you mount the filesystem, you can do this now with:</p>
<pre>mount -o remount /tmp</pre>
<p>Very if it by running:</p>
<pre>root@earth:/tmp# mount |grep /tmp
/dev/sda3 on /tmp type ext3 (rw,noexec,nosuid)</pre>
<p>The output line should contain the two words &#8216;noexec,nosuid&#8217; in it.  If this is in place then you&#8217;re covered.</p>
<p>The only problem now is that when <tt>apt-get</tt> upgrades your system it will sometimes place scripts inside   the temp directory which will now not be executable.</p>
<p>The fix for this is to temporarily make the temporary directory executable before running <tt>apt-get</tt> and   then remove the execution bits afterwards.  This would be a troublesome thing to remember doing ourselves &#8211; but   thankfully we can set it up to be automatic.</p>
<p>Add the following to the file <tt>/etc/apt/apt.conf</tt>:</p>
<pre>DPkg::Pre-Install-Pkgs {"mount -o remount,exec /tmp";};
DPkg::Post-Invoke {"mount -o remount /tmp";};</pre>
<p>In Debian Etch (4.0) the file is named /etc/apt/apt.conf.d/70debconf</p>
<p>This contains two lines, one running before any packing installation and one afterwards.  They merely execute the   commands required to add and remove the execute permissions on the <tt>/tmp</tt></p>
<p>Source: <a href="http://www.debian-administration.org/articles/57" target="_blank">http://www.debian-administration.org/articles/57</a></p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/www.debian-administration.org\/articles\/57"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTAvMDQvbWFraW5nLXRtcC1ub24tZXhlY3V0YWJsZS88d3B0Yj5NYWtpbmcgL3RtcCBub24tZXhlY3V0YWJsZTx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/10/04/making-tmp-non-executable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Geo::IP Perl Module on Debian Etch</title>
		<link>http://pario.no/2007/09/27/install-geoip-perl-module-on-debian-etch/</link>
		<comments>http://pario.no/2007/09/27/install-geoip-perl-module-on-debian-etch/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 10:01:52 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[geoip]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://pario.no/2007/09/27/install-geoip-perl-module-on-debian-etch/</guid>
		<description><![CDATA[This post describes how to install MaxMind Geo::IP perl module on Debian Etch. You need the GeoIP C library (that includes also the free GeoLite Country database). This is fortunately available in the Debian repositories. apt-get install libgeoip1 libgeoip-dev To install the GeoIP perl module, we need to download the perl module locally from MaxMind [...]]]></description>
			<content:encoded><![CDATA[<p>This post describes how to install <a href="http://www.maxmind.com/app/perl" target="_blank">MaxMind Geo::IP perl module</a> on Debian Etch.</p>
<p>You need the <strong>GeoIP C library</strong> (that includes also the <a href="http://www.maxmind.com/app/geoip_country" target="_blank">free GeoLite Country database</a>).  This is fortunately available in the Debian repositories.</p>
<pre>
apt-get install libgeoip1 libgeoip-dev</pre>
<p>To install the <strong>GeoIP perl module</strong>, we need to download the perl module locally from <a href="http://www.maxmind.com/download/geoip/api/perl/" target="_blank">MaxMind</a> or from CPAN. Uncompress the file and compile.</p>
<pre>
perl Makefile.PL
make
make test
make install</pre>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/www.maxmind.com\/app\/perl","http:\/\/www.maxmind.com\/app\/geoip_country","http:\/\/www.maxmind.com\/download\/geoip\/api\/perl\/"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMDkvMjcvaW5zdGFsbC1nZW9pcC1wZXJsLW1vZHVsZS1vbi1kZWJpYW4tZXRjaC88d3B0Yj5JbnN0YWxsIEdlbzo6SVAgUGVybCBNb2R1bGUgb24gRGViaWFuIEV0Y2g8d3B0Yj5odHRwOi8vcGFyaW8ubm88d3B0Yj5QYXJpbyBUZWNobm9CbG9i";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/09/27/install-geoip-perl-module-on-debian-etch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

