<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
<channel>
    <title>freebsd.munk.me.uk - FreeBSD</title>
    <link>http://freebsd.munk.me.uk/</link>
    <description>FreeBSD System Administration</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.2 - http://www.s9y.org/</generator>
    
    <image>
        <url>http://freebsd.munk.me.uk/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: freebsd.munk.me.uk - FreeBSD - FreeBSD System Administration</title>
        <link>http://freebsd.munk.me.uk/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Moving munk.me.uk to a new HDD - filesystem layout</title>
    <link>http://freebsd.munk.me.uk/archives/210-Moving-munk.me.uk-to-a-new-HDD-filesystem-layout.html</link>
            <category>FreeBSD</category>
            <category>General</category>
            <category>Hardware</category>
    
    <comments>http://freebsd.munk.me.uk/archives/210-Moving-munk.me.uk-to-a-new-HDD-filesystem-layout.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=210</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=210</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Well after having been on FreeBSD 4.x for as long as I can remember (4years now I guess), it&#039;s finally time to move to FreeBSD 6.x!  For ages I&#039;ve been saying as soon as I get a larger HDD I&#039;d upgrade the system and santa kindly delivered a shiny new 250Gb Maxtor DiamondMax 10, so it&#039;s time to sort it out and make the move.&lt;br /&gt;
&lt;br /&gt;
Funny now I think about it, for me upgrading to a larger capacity HDD has always been a fairly rare occasion.  Back in 2000 or so I remember moving from a measily 1.6Gb to a whopping 20Gb HDD and thinking that was way too much.  In a way it&#039;s a good thing to not have a lot of space - it makes you more tidy and less likely to spam crap all over the filesystem.  Of course on the other hand not having a lot of space also sucks if you want to store a lot of stuff (duh).  This is kind of how it&#039;s been with my FreeBSD server for the last 4yrs or so - I&#039;ve only had a 40Gb drive and in that time I&#039;ve hosted over 100 users at the same time, dozens of domains, ran a load of services, and never really had a lot to complain about re lack of space.  The main reason for the change I guess is the increased use of broadband/bittorrent which I really need more space to save files to disk for.&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna document the filesystem layout of the new HDD here, no doubt it&#039;ll only be me that ever reads this again (and you if you&#039;re reading this heh :o).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;File System Layout&lt;/b&gt;&lt;br /&gt;
I spent quite a while thinking about how best to partition/slice up the new 250Gb disk, mainly because my server is running 24/7 and various applications really do kane the filesystem when accessing data (ie apache and mysql for two).  I want to try and partition the disk so that it&#039;s more efficient for apache and mysql to read/write from/to the disks.  &lt;br /&gt;
&lt;br /&gt;
The other deliberation I went through whilst thinking about the file system layout was where to mount partitions for backups, music, videos and windows application installers.  Of course this could be anywhere really - /backups /music /videos /windows for example - but I don&#039;t really like spamming the root level filesystem with lots of folders that only add clutter.&lt;br /&gt;
&lt;br /&gt;
I had a quick look at the &lt;a href=&quot;http://www.pathname.com/fhs/&quot;  title=&quot;filesystem hierarchy standard&quot;&gt;Filesystem Hierarchy Standard&lt;/a&gt; which is a standard aimed at encouraging clean and consistent filesystem layouts on Unix type OSs and eventually ended up with the following layout:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;G=Gigabytes&lt;br /&gt;
&lt;br /&gt;
fdisk&amp;#58;&lt;br /&gt;
======&lt;br /&gt;
&lt;br /&gt;
Name&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Size&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Partition&amp;#160;Type&lt;br /&gt;
====&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;====&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;==============&lt;br /&gt;
ad1s1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;59G&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;freebsd&lt;br /&gt;
ad1s2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;89G&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;freebsd&lt;br /&gt;
ad1s3&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;49G&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;freebsd&lt;br /&gt;
ad1s4&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;33G&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;freebsd&lt;br /&gt;
&lt;br /&gt;
disklabel&amp;#58;&lt;br /&gt;
==========&lt;br /&gt;
&lt;br /&gt;
Partition&amp;#160;&amp;#160;&amp;#160;&amp;#160;Mount&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Size&amp;#160;&amp;#40;approx.&amp;#41;&lt;br /&gt;
=========&amp;#160;&amp;#160;&amp;#160;&amp;#160;=====&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;==============&lt;br /&gt;
ad1s1&amp;#58;&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
ad1s1a&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;0.5G&lt;br /&gt;
&lt;br /&gt;
ad1s1b&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;swap&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;2G&lt;br /&gt;
&lt;br /&gt;
ad1s1d&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/tmp&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;1G&lt;br /&gt;
&lt;br /&gt;
ad1s1e&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/var/db/mysql&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;20G&lt;br /&gt;
&lt;br /&gt;
ad1s1f&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/var/www&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;10G&lt;br /&gt;
&lt;br /&gt;
ad1s1g&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/var/&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;10G&lt;br /&gt;
&lt;br /&gt;
ad1s1h&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/usr&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;20G&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ad1s2&amp;#58;&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
ad1s2d&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/home&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;40G&lt;br /&gt;
&lt;br /&gt;
ad1s2e&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/var/backups&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;50G&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ad1s3&amp;#58;&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
ad1s3d&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/var/media&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;50G&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ad1s4&amp;#58;&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
ad2s4d&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/var/win32&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;35G&lt;/div&gt; 
    </content:encoded>

    <pubDate>Fri, 05 Jan 2007 14:25:00 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/210-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Let root see all files with locate</title>
    <link>http://freebsd.munk.me.uk/archives/207-Let-root-see-all-files-with-locate.html</link>
            <category>FreeBSD</category>
            <category>Shell</category>
            <category>SSH</category>
    
    <comments>http://freebsd.munk.me.uk/archives/207-Let-root-see-all-files-with-locate.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=207</wfw:comment>

    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=207</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    The &lt;a href=&quot;http://nixdoc.net/man-pages/FreeBSD/locate.1.html&quot;  title=&quot;locate manpage&quot;&gt;locate&lt;/a&gt; utility on linux was one of the first tools I hit when I made the move to FreeBSD a few years back - knowing where files are is half the battle when you&#039;re trying to configure things and find documentation on how to do it. The trouble with locate though as &lt;a href=&quot;http://freebsd.amazingdev.com/blog/archives/000805.html&quot;  title=&quot;Locate This!&quot;&gt;jdarnold mentions in his article &#039;Locate This!&#039;&lt;/a&gt; is that if you build the locate database as &#039;root&#039;, you end up exposing everything to any user that runs the locate command.  The other problem he mentions is the locate db is only updated weekly on FreeBSD by default via the &lt;a href=&quot;http://www.freebsd.org/cgi/man.cgi?query=periodic&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+6.1-RELEASE&amp;format=html&quot;  title=&quot;periodic manpage&quot;&gt;periodic&lt;/a&gt; system which isn&#039;t really enough if you use your system regularly.&lt;br /&gt;
&lt;br /&gt;
I remember thinking along the same lines a while back and after reading through the man pages the solution I found was to create two separate databases - one for root and one for regular users.  The &#039;regular&#039; db is updated on a weekly basis as per the default on FreeBSD via periodic, whereas the other &#039;root&#039; locate db is built daily in a crontab so I can get the latest up to date details on which files are where.&lt;br /&gt;
&lt;br /&gt;
To get the root db built first you need to create a crontab entry - i put this in /etc/crontab:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;39&amp;#160;&amp;#160;2&amp;#160;&amp;#160;&amp;#160;&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&amp;#160;&amp;#160;&amp;#160;root&amp;#160;&amp;#160;&amp;#160;&amp;#160;env&amp;#160;-i&amp;#160;LOCATE_CONFIG=/root/locate/conf/locate.rc&amp;#160;/usr/libexec/locate.updatedb&amp;#160;&amp;#62;&amp;#160;/dev/null&amp;#160;2&amp;#62;&amp;amp;1&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This tells the locate.updatedb script to use a separate configuration file - /root/locate/conf/locate.rc - for building root&#039;s locate db.  The content of /root/locate/conf/locate.rc look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;FCODES=&quot;/root/locate/db/locate.database.root&quot;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
which indicates that this db should be built in /root/locate/db/locate.database.root instead of the default locate in /var/db/locate.database.  You can safely run the command as root on the commandline to initialize your new db:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@users&amp;#160;/root#&amp;#160;env&amp;#160;-i&amp;#160;LOCATE_CONFIG=/root/locate/conf/locate.rc&amp;#160;/usr/libexec/locate.updatedb&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Once the database is built you can move on to test the new db works ok:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@users&amp;#160;/root#&amp;#160;locate&amp;#160;-d&amp;#160;/root/locate/db/locate.database.root&amp;#160;.cshrc.root&lt;br /&gt;
/root/.cshrc.root&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This file is only readable by root, so it seems to work ok.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To make things easier, add a shell alias in root&#039;s .cshrc file aliasing &#039;locate&#039; to the command &#039;locate -d /root/locate/db/locate.database.root&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@users&amp;#160;/root#&amp;#160;grep&amp;#160;locate&amp;#160;$cshrc&lt;br /&gt;
alias&amp;#160;locate&amp;#160;locate&amp;#160;-d&amp;#160;/root/locate/db/locate.database.root&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
With the &quot;-d /root/locate/db/locate.database.root&quot; switch, locate will use the db at /root/locate/db/locate.database.root instead of the default /var/db/locate.database and root will be able to use locate to find any files in the filesystem, not just those that are world readable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, one way to update the regular locate db as root but without making it list every world readable file is to perform the following:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;#!/bin/sh&lt;br /&gt;
#&amp;#160;make&amp;#160;sure&amp;#160;db&amp;#160;file&amp;#160;exists&amp;#58;&lt;br /&gt;
touch&amp;#160;/var/db/locate.database&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;then&amp;#160;change&amp;#160;ownership&amp;#160;to&amp;#160;the&amp;#160;nobody&amp;#160;user&amp;#58;&lt;br /&gt;
chown&amp;#160;nobody&amp;#160;/var/db/locate.database&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;make&amp;#160;it&amp;#160;writeable&amp;#160;by&amp;#160;nobody&amp;#160;and&amp;#160;readable&amp;#160;by&amp;#160;everyone&amp;#160;else&amp;#58;&lt;br /&gt;
chmod&amp;#160;644&amp;#160;/var/db/locate.database&amp;#160;&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;then&amp;#160;move&amp;#160;on&amp;#160;to&amp;#160;update&amp;#160;the&amp;#160;db...&lt;br /&gt;
#&amp;#160;first&amp;#160;make&amp;#160;sure&amp;#160;we&#039;re&amp;#160;in&amp;#160;the&amp;#160;/&amp;#160;folder&amp;#160;where&amp;#160;the&amp;#160;db&amp;#160;update&amp;#160;starts&amp;#58;&lt;br /&gt;
cd&amp;#160;/&amp;#160;&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;then&amp;#160;finally&amp;#160;run&amp;#160;the&amp;#160;updatedb&amp;#160;command&amp;#160;as&amp;#160;the&amp;#160;&#039;nobody&#039;&amp;#160;user&amp;#58;&lt;br /&gt;
echo&amp;#160;&quot;/usr/libexec/locate.updatedb&quot;&amp;#160;|&amp;#160;su&amp;#160;-&amp;#160;-fm&amp;#160;nobody&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This is basically what the 310.locate periodic script does and results in a locate db that contains only files that are readable by the &#039;nobody&#039; user - essentially all &#039;world readable&#039; files.&lt;br /&gt;
&lt;br /&gt;
Comparing the sizes of the root db against the nobody db:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@users&amp;#160;/#&amp;#160;ls&amp;#160;-al&amp;#160;/var/db/locate.database&amp;#160;/root/locate/db/locate.database.root&lt;br /&gt;
-rw-r--r--&amp;#160;&amp;#160;1&amp;#160;root&amp;#160;&amp;#160;&amp;#160;&amp;#160;wheel&amp;#160;&amp;#160;4070484&amp;#160;Nov&amp;#160;18&amp;#160;02&amp;#58;45&amp;#160;/root/locate/db/locate.database.root&lt;br /&gt;
-rw-r--r--&amp;#160;&amp;#160;1&amp;#160;nobody&amp;#160;&amp;#160;wheel&amp;#160;&amp;#160;3280409&amp;#160;Nov&amp;#160;18&amp;#160;11&amp;#58;41&amp;#160;/var/db/locate.database&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
You can see the size difference there, not as many entries in nobody&#039;s db as root&#039;s.  Just to double check:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@users&amp;#160;/root#&amp;#160;locate&amp;#160;.cshrc.root&lt;br /&gt;
/root/bin/ktrace.out&lt;br /&gt;
/root/ktrace.out&lt;br /&gt;
/usr/local/etc/snort/ktrace.out&lt;br /&gt;
root@users&amp;#160;/root#&amp;#160;echo&amp;#160;&quot;locate&amp;#160;ktrace.out&quot;&amp;#160;|&amp;#160;su&amp;#160;-&amp;#160;-fm&amp;#160;nobody&lt;br /&gt;
/usr/local/etc/snort/ktrace.out&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
So from that you can see that &#039;nobody&#039; can see the ktrace.out files located in /root - apart from root of course :)  Sorted. 
    </content:encoded>

    <pubDate>Sat, 18 Nov 2006 10:38:40 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/207-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>FreeBSD 6.2 To Include Security Event Auditing</title>
    <link>http://freebsd.munk.me.uk/archives/206-FreeBSD-6.2-To-Include-Security-Event-Auditing.html</link>
            <category>FreeBSD</category>
            <category>Security</category>
    
    <comments>http://freebsd.munk.me.uk/archives/206-FreeBSD-6.2-To-Include-Security-Event-Auditing.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=206</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=206</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Just read an interesting article about &lt;a href=&quot;http://www.securityfocus.com/columnists/422/&quot;  title=&quot;Security Event Auditing in FreeBSD 6.2&quot;&gt; the addition of &#039;Security Event Auditing&#039; in FreeBSD 6.2&lt;/a&gt;.  Until now FreeBSD hasn&#039;t had any really useful security auditing other than using &#039;accounting&#039; to log all syscalls which at best was confusing when it came to working out who did what when and how.&lt;br /&gt;
&lt;br /&gt;
At one time &lt;a href=&quot;http://freebsd.munk.me.uk/archives/112-Installed-and-Configured-lrexec-module-For-Logging-System-Calls.html#extended&quot;  title=&quot;lrexec kernel module security logging on FreeBSD&quot;&gt;I installed a kernel module lrexec to log all system exec calls&lt;/a&gt;, but this was also quite a handful to configure scripts so they reported only on certain users.  Hopefully this new security auditing daemon will make security auditing a lot easier on FreeBSD.  &lt;br /&gt;
&lt;br /&gt;
Read the article for more info on what&#039;s new:&lt;br /&gt;
&lt;a href=&quot;http://www.securityfocus.com/columnists/422/&quot;  title=&quot;Security Event Auditing in FreeBSD 6.2&quot;&gt; Security Event Auditing in FreeBSD 6.2&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Also of interest is the new addition to the FreeBSD handbook on security auditing:&lt;br /&gt;
&lt;a href=&quot;http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/audit.html&quot;  title=&quot;Security event auditing in FreeBSD handbook&quot;&gt;FreeBSD Handbook: Security Event Auditing&lt;/a&gt; 
    </content:encoded>

    <pubDate>Tue, 14 Nov 2006 16:38:39 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/206-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Samba Upgrade to 3.0.23c and Login Failures</title>
    <link>http://freebsd.munk.me.uk/archives/176-Samba-Upgrade-to-3.0.23c-and-Login-Failures.html</link>
            <category>FreeBSD</category>
            <category>Ports</category>
    
    <comments>http://freebsd.munk.me.uk/archives/176-Samba-Upgrade-to-3.0.23c-and-Login-Failures.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=176</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=176</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    I just went to upgrade &lt;a href=&quot;http://www.samba.org/&quot;  title=&quot;Samba Network File System&quot;&gt;Samba&lt;/a&gt; to the latest FreeBSD port release - 3.0.23c.  The portupgrade went smoothly but when I went to restart the samba daemon, I found I was locked out of the network shares on the FreeBSD machine when trying to login/access them from Windows.&lt;br /&gt;
&lt;br /&gt;
Reading in /usr/ports/UPDATING revealed the problem:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;20060904&amp;#58;&lt;br /&gt;
&amp;#160;&amp;#160;AFFECTS&amp;#58;&amp;#160;users&amp;#160;of&amp;#160;net/samba3&lt;br /&gt;
&amp;#160;&amp;#160;AUTHOR&amp;#58;&amp;#160;timur@gnu.org&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;Reviosion&amp;#160;of&amp;#160;Samba&amp;#160;3.0.23c&amp;#160;port&amp;#160;had&amp;#160;changed&amp;#160;location&amp;#160;of&amp;#160;the&amp;#160;directory,&lt;br /&gt;
&amp;#160;&amp;#160;where&amp;#160;Samba&amp;#160;stores&amp;#160;it&#039;s&amp;#160;smbpasswd&amp;#160;files&amp;#160;from&amp;#160;$PREFIX/private&amp;#160;to&amp;#160;a&amp;#160;more&lt;br /&gt;
&amp;#160;&amp;#160;common&amp;#160;$PREFIX/etc/samba.&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;You&amp;#160;need&amp;#160;to&amp;#160;move&amp;#160;&amp;#42;.tdb&amp;#160;files&amp;#160;from&amp;#160;an&amp;#160;old&amp;#160;to&amp;#160;new&amp;#160;location&amp;#160;and&amp;#160;remove&amp;#160;old&lt;br /&gt;
&amp;#160;&amp;#160;directory&amp;#160;if&amp;#160;you&amp;#160;use&amp;#160;tdbsam&amp;#160;backend&amp;#160;for&amp;#160;Samba&amp;#160;user&amp;#160;authentication.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The location of the samba password dbs changed!  Small sigh of relief, moved the db files over and everything worked as normal.&lt;br /&gt;
&lt;br /&gt;
Pays to read /usr/ports/UPDATING! 
    </content:encoded>

    <pubDate>Tue, 05 Sep 2006 20:10:02 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/176-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Solving permission problems with parsepath.pl</title>
    <link>http://freebsd.munk.me.uk/archives/175-Solving-permission-problems-with-parsepath.pl.html</link>
            <category>Apache</category>
            <category>FreeBSD</category>
            <category>General</category>
            <category>Perl</category>
            <category>PHP</category>
            <category>Security</category>
            <category>Shell</category>
            <category>SSH</category>
    
    <comments>http://freebsd.munk.me.uk/archives/175-Solving-permission-problems-with-parsepath.pl.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=175</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=175</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    &lt;a href=&quot;http://sial.org/howto/debug/unix/parsepath&quot;  title=&quot;parsepath.pl - a script for solving file permission problems&quot;&gt;parsepath.pl&lt;/a&gt; is a brilliant perl script for fixing permissions problems on Unix based platforms by &lt;a href=&quot;http://sial.org/&quot;  title=&quot;Jeremy Mates&quot;&gt;Jeremy Mates&lt;/a&gt;.   Probably the most common type of permission problem from a sysadmin/webmaster&#039;s viewpoint is uploading a file to a directory in a website&#039;s document root folder and then trying to access the file or script in a web browser only to get the dreaded 403 error message:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Forbidden&lt;br /&gt;
You don&#039;t have permission to access /foo/bar/test.php on this server.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Most time the solution is very simple, just change the permissions on &#039;test.php&#039; to make sure the user the webserver runs as can read the file correctly - the simplest and most common method being to change the mode of the file to &#039;755&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;chmod&amp;#160;755&amp;#160;test.php&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Unfortunately sometimes it&#039;s not that easy and many times you see users asking &#039;I&#039;m getting &#039;access denied&#039; errors even though I&#039;ve changed the perms to 755&#039;.  The problem is that one of the subdirectories that the &#039;test.php&#039; file lives in has permissions set so that the webserver can&#039;t read the file properly.  Now that&#039;s where the headache comes in :)&lt;br /&gt;
&lt;br /&gt;
However, &lt;a href=&quot;http://sial.org/howto/debug/unix/parsepath&quot;  title=&quot;parsepath.pl - a script for solving file permission problems&quot;&gt;parsepath.pl&lt;/a&gt; can take the headache out of fixing permissions problems.&lt;br /&gt;
&lt;br /&gt;
Say you have a website document root directory tree /usr/local/www/web/www.munk.me.uk/foo/bar and you upload a web script &#039;test.php&#039; into that directory.  You try and access the file in a webbrowser but get the 403 permission denied error above.  First off you check the permissions on the file itself:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;&amp;#91;23&amp;#58;58&amp;#58;17&amp;#93;&amp;#160;root@users&amp;#160;/usr/local/www/web/www.munk.me.uk/foo/bar#&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;;&amp;#160;ls&amp;#160;-l&lt;br /&gt;
total&amp;#160;0&lt;br /&gt;
-rwxr-xr-x&amp;#160;&amp;#160;1&amp;#160;www&amp;#160;www&amp;#160;&amp;#160;0&amp;#160;Sep&amp;#160;&amp;#160;4&amp;#160;23&amp;#58;39&amp;#160;test.php&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
That looks ok, with permissions 755 and the owner/group set to &#039;www&#039; the webserver user &#039;www&#039; should be able to read the file ok.  So in this case the problem must be with the permissions on one of the parent subdirectories.  The old method of working out the perms would be either to trawl one by one through each directory checking the perms on each subdirectory or to change the permissions recursively on the document root folder so all subfolders have the read bit set for the webserver user/group.&lt;br /&gt;
&lt;br /&gt;
With parsepath.pl things are a lot simpler though - just run the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;&amp;#91;0&amp;#58;03&amp;#58;21&amp;#93;&amp;#160;root@users&amp;#160;/usr/local/www/web/www.munk.me.uk/foo/bar#&amp;#160;parsepath.pl&amp;#160;user=www&amp;#160;+r&amp;#160;test.php&lt;br /&gt;
!&amp;#160;group=www&amp;#160;+rx&amp;#160;fails&amp;#58;&amp;#160;d&amp;#160;0700&amp;#160;root&amp;#58;www&amp;#160;/usr/local/www/web/www.munk.me.uk/foo&lt;br /&gt;
!&amp;#160;unix-other&amp;#160;+rx&amp;#160;fails&amp;#58;&amp;#160;d&amp;#160;0750&amp;#160;root&amp;#58;wheel&amp;#160;/usr/local/www/web/www.munk.me.uk/foo/bar&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
With this command parsepath.pl  recurses through each subdirectory below the file/path you feed it on the commandline and tells you the permissions problems - if any - for the user &#039;www&#039; (the user=www argument) to read (the +r argument) the file &#039;test.php&#039;.&lt;br /&gt;
&lt;br /&gt;
In the output, we&#039;re told that permissions to read the test.php by the user www fails on two counts:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;#&amp;#160;the&amp;#160;group&amp;#160;bit&amp;#160;on&amp;#160;the&amp;#160;folder&amp;#160;&#039;foo&#039;&amp;#160;doesn&#039;t&amp;#160;have&amp;#160;the&amp;#160;+rx&amp;#160;flag&amp;#160;set&amp;#58;&lt;br /&gt;
!&amp;#160;group=www&amp;#160;+rx&amp;#160;fails&amp;#58;&amp;#160;d&amp;#160;0700&amp;#160;root&amp;#58;www&amp;#160;/usr/local/www/web/www.munk.me.uk/foo&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;the&amp;#160;other&amp;#160;bit&amp;#160;on&amp;#160;the&amp;#160;folder&amp;#160;&#039;bar&#039;&amp;#160;doesn&#039;t&amp;#160;have&amp;#160;the&amp;#160;+rx&amp;#160;flag&amp;#160;set&amp;#58;&lt;br /&gt;
!&amp;#160;unix-other&amp;#160;+rx&amp;#160;fails&amp;#58;&amp;#160;d&amp;#160;0750&amp;#160;root&amp;#58;wheel&amp;#160;/usr/local/www/web/www.munk.me.uk/foo/bar&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
With this information it&#039;s easy enough to go in and make the changes necessary to fix the problem using &#039;chmod g+rx foo foo/bar&#039;.&lt;br /&gt;
&lt;br /&gt;
There are other ways of invoking parsepath.pl though.  Running it just with a file/path as an argument it&#039;ll tell you the permissions on each subdirectory under it:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;&amp;#91;0&amp;#58;10&amp;#58;33&amp;#93;&amp;#160;root@users&amp;#160;/usr/local/www/web/www.munk.me.uk/foo/bar#&amp;#160;&lt;br /&gt;
&amp;#62;&amp;#160;parsepath.pl&amp;#160;/usr/local/www/web/www.munk.me.uk/foo/bar/test.php&lt;br /&gt;
%&amp;#160;/usr/local/www/web/www.munk.me.uk/foo/bar/test.php&lt;br /&gt;
d&amp;#160;0755&amp;#160;root&amp;#58;wheel&amp;#160;/&lt;br /&gt;
d&amp;#160;0755&amp;#160;root&amp;#58;wheel&amp;#160;/usr&lt;br /&gt;
d&amp;#160;0755&amp;#160;root&amp;#58;wheel&amp;#160;/usr/local&lt;br /&gt;
d&amp;#160;0755&amp;#160;root&amp;#58;wheel&amp;#160;/usr/local/www&lt;br /&gt;
d&amp;#160;0770&amp;#160;www&amp;#58;wheel&amp;#160;/usr/local/www/web&lt;br /&gt;
d&amp;#160;0750&amp;#160;www&amp;#58;www&amp;#160;/usr/local/www/web/www.munk.me.uk&lt;br /&gt;
d&amp;#160;0700&amp;#160;root&amp;#58;www&amp;#160;/usr/local/www/web/www.munk.me.uk/foo&lt;br /&gt;
d&amp;#160;0750&amp;#160;root&amp;#58;wheel&amp;#160;/usr/local/www/web/www.munk.me.uk/foo/bar&lt;br /&gt;
f&amp;#160;0755&amp;#160;root&amp;#58;www&amp;#160;/usr/local/www/web/www.munk.me.uk/foo/bar/test.php&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
which can is better to see a whole tree in one go.  &lt;br /&gt;
&lt;br /&gt;
No permissions were harmed in the making of this article!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;ll include the parsepath.pl script in the extended article just in case the original ever gets lost - big credit of course goes to the author of the script, &lt;a href=&quot;http://sial.org/&quot;  title=&quot;Jeremy Mates&quot;&gt;Jeremy Mates&lt;/a&gt;.  His site is actually very interesting from a sysadmin&#039;s point of view containing lots of interesting admin scripts and thoughts on system administration in general - spent quite a while grazing through his stuff there - cheers Jeremy.&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://freebsd.munk.me.uk/archives/175-Solving-permission-problems-with-parsepath.pl.html#extended&quot;&gt;Continue reading &quot;Solving permission problems with parsepath.pl&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 04 Sep 2006 22:41:00 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/175-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Snort upgrade to 2.6.0 fails in make build on FreeBSD 4.11</title>
    <link>http://freebsd.munk.me.uk/archives/173-Snort-upgrade-to-2.6.0-fails-in-make-build-on-FreeBSD-4.11.html</link>
            <category>FreeBSD</category>
            <category>FreeBSD PRs</category>
            <category>Ports</category>
            <category>Security</category>
            <category>Snort</category>
    
    <comments>http://freebsd.munk.me.uk/archives/173-Snort-upgrade-to-2.6.0-fails-in-make-build-on-FreeBSD-4.11.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=173</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=173</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    &lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;br /&gt;
Yay this is now fixed, seemed to be a fairly simple solution too. All good!&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/102922&quot; &gt;http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/102922&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;hr/&gt;&lt;br /&gt;
A few days ago I went to upgrade snort to the latest version (from 2.4.5 to 2.6.0) and it failed at the &#039;make build&#039; stage.  I&#039;ve just had a chance to look into the problem and it appears to be to do with the build of the dynamic rule processing functionality.  A temporary workaround is to build snort with the &#039;-DWITHOUT_DYNAMIC&#039; flag on FreeBSD:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;cd&amp;#160;/usr/ports/security/snort&lt;br /&gt;
make&amp;#160;-DWITHOUT_DYNAMIC&amp;#160;clean&amp;#160;install&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Hopefully a full fix will be found in the next few weeks.  I&#039;m about to submit a problem report (PR) once the maintainer&#039;s had a chance to look it over, I&#039;ll cc it to the snort-users mailing list as well in the hope someone there will have a better idea what the problem is.&lt;br /&gt;
&lt;br /&gt;
The PR is included in the extended article.&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://freebsd.munk.me.uk/archives/173-Snort-upgrade-to-2.6.0-fails-in-make-build-on-FreeBSD-4.11.html#extended&quot;&gt;Continue reading &quot;Snort upgrade to 2.6.0 fails in make build on FreeBSD 4.11&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sat, 02 Sep 2006 18:12:54 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/173-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Rolling back the ports tree to an earlier time</title>
    <link>http://freebsd.munk.me.uk/archives/172-Rolling-back-the-ports-tree-to-an-earlier-time.html</link>
            <category>FreeBSD</category>
            <category>Ports</category>
    
    <comments>http://freebsd.munk.me.uk/archives/172-Rolling-back-the-ports-tree-to-an-earlier-time.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=172</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=172</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Upgrading a port can be a real annoyance when it turns out the upgraded port doesn&#039;t actually work too well or has bugs that make it unusable.  This has happened to me on a number of times and I&#039;ve resorted to &#039;rolling back&#039; the port to an eariler version / date that I know will work ok.&lt;br /&gt;
&lt;br /&gt;
In essence you simply roll back the ports tree to an earlier date in time using &lt;a href=&quot;http://www.freebsd.org/handbook/cvsup.html&quot;  title=&quot;Using FreeBSD cvsup&quot;&gt;cvsup&lt;/a&gt;&#039;s date tagline in the &lt;a href=&quot;http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html#CVSUP-CONFIG&quot;  title=&quot;cvsup supfile configuration&quot;&gt;cvsup ports supfile&lt;/a&gt; you use:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;#&amp;#160;One&amp;#160;day&amp;#160;ago&amp;#58;&lt;br /&gt;
&amp;#42;default&amp;#160;date=2006.09.01.00.00.00&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This way when cvsup fetches the ports tree, the tree that was in place at the date specified will be grabbed instead of the current most up to date tree.&lt;br /&gt;
&lt;br /&gt;
Of course this has the problem of reverting *all* ports to the earlier date, so another cvsup would be required without the &#039;date&#039; tagline in the supfile to bring the ports tree back up to the current date.  &lt;br /&gt;
&lt;br /&gt;
Other options to avoid clobbering the whole ports tree:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li/&gt;Modify the &#039;prefix&#039; tagline in the cvsup file to be different to /usr/ports:&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;&amp;#42;default&amp;#160;prefix=/tmp/usr&lt;/div&gt;&lt;br /&gt;
This will set cvsup to download the old ports tree into /tmp/usr/ports and from there you can copy over the particular port you&#039;re interested in into /usr/ports.&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Use &lt;a href=&quot;http://www.freebsd.org/cgi/cvsweb.cgi/ports/&quot;  title=&quot;FreeBSD cvsweb ports tree&quot;&gt;cvsweb &lt;/a&gt;to work out which files changed since the port last worked correctly and download the known working good files into the port&#039;s directory.  Rebuilding the port from those files should do the trick to get the port rolled back.  In fact it might be easier to use the excellent &lt;a href=&quot;http://www.freshports.org/&quot;  title=&quot;Freshports&quot;&gt;FreshPorts site&lt;/a&gt; to see more easily which files were touched since the last known working good version of the port.&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
This article has lots of advice on rolling back ports:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://ezine.daemonnews.org/200406/ports-things-go-wrong.html&quot;  title=&quot;Rolling back ports in FreeBSD&quot;&gt;Rolling back ports to an earlier time&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sat, 02 Sep 2006 16:41:13 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/172-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>FreeBSD Security Advisory - Boundary checking errors in syscons</title>
    <link>http://freebsd.munk.me.uk/archives/159-FreeBSD-Security-Advisory-Boundary-checking-errors-in-syscons.html</link>
            <category>FreeBSD</category>
            <category>Security</category>
    
    <comments>http://freebsd.munk.me.uk/archives/159-FreeBSD-Security-Advisory-Boundary-checking-errors-in-syscons.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=159</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=159</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Another freebsd related sec advisory, only applicable to admins who have users who login to FreeBSD systems &lt;b&gt;locally&lt;/b&gt; - ie on ttyv* local consoles.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;=============================================================================&lt;br /&gt;
FreeBSD-SA-04&amp;#58;15.syscons&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Security&amp;#160;Advisory&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;The&amp;#160;FreeBSD&amp;#160;Project&lt;br /&gt;
&lt;br /&gt;
Topic&amp;#58;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Boundary&amp;#160;checking&amp;#160;errors&amp;#160;in&amp;#160;syscons&lt;br /&gt;
&lt;br /&gt;
Category&amp;#58;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;core&lt;br /&gt;
Module&amp;#58;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;sys_dev_syscons&lt;br /&gt;
Announced&amp;#58;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;2004-10-04&lt;br /&gt;
Credits&amp;#58;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Christer&amp;#160;Oberg&lt;br /&gt;
Affects&amp;#58;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;FreeBSD&amp;#160;5.x&amp;#160;releases&lt;br /&gt;
Corrected&amp;#58;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;2004-09-30&amp;#160;17&amp;#58;49&amp;#58;15&amp;#160;UTC&amp;#160;&amp;#40;RELENG_5,&amp;#160;5.3-BETA6&amp;#41;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;2004-10-04&amp;#160;17&amp;#58;04&amp;#58;25&amp;#160;UTC&amp;#160;&amp;#40;RELENG_5_2,&amp;#160;5.2.1-RELEASE-p11&amp;#41;&lt;br /&gt;
CVE&amp;#160;Name&amp;#58;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;CAN-2004-0919&lt;br /&gt;
FreeBSD&amp;#160;only&amp;#58;&amp;#160;&amp;#160;&amp;#160;YES&lt;br /&gt;
&lt;br /&gt;
For&amp;#160;general&amp;#160;information&amp;#160;regarding&amp;#160;FreeBSD&amp;#160;Security&amp;#160;Advisories,&lt;br /&gt;
including&amp;#160;descriptions&amp;#160;of&amp;#160;the&amp;#160;fields&amp;#160;above,&amp;#160;security&amp;#160;branches,&amp;#160;and&amp;#160;the&lt;br /&gt;
following&amp;#160;sections,&amp;#160;please&amp;#160;visit&lt;br /&gt;
&amp;#60;URL&amp;#58;http&amp;#58;//www.freebsd.org/security/&amp;#62;.&lt;br /&gt;
&lt;br /&gt;
I.&amp;#160;&amp;#160;&amp;#160;Background&lt;br /&gt;
&lt;br /&gt;
syscons&amp;#40;4&amp;#41;&amp;#160;is&amp;#160;the&amp;#160;default&amp;#160;console&amp;#160;driver&amp;#160;for&amp;#160;FreeBSD.&amp;#160;&amp;#160;Using&amp;#160;the&lt;br /&gt;
physical&amp;#160;keyboard&amp;#160;and&amp;#160;screen,&amp;#160;it&amp;#160;provides&amp;#160;multiple&amp;#160;virtual&amp;#160;terminals&lt;br /&gt;
which&amp;#160;appear&amp;#160;as&amp;#160;if&amp;#160;they&amp;#160;were&amp;#160;separate&amp;#160;terminals.&amp;#160;&amp;#160;One&amp;#160;virtual&amp;#160;terminal&lt;br /&gt;
is&amp;#160;considered&amp;#160;current&amp;#160;and&amp;#160;exclusively&amp;#160;occupies&amp;#160;the&amp;#160;screen&amp;#160;and&amp;#160;the&lt;br /&gt;
keyboard;&amp;#160;the&amp;#160;other&amp;#160;virtual&amp;#160;terminals&amp;#160;are&amp;#160;placed&amp;#160;in&amp;#160;the&amp;#160;background.&lt;br /&gt;
&lt;br /&gt;
II.&amp;#160;&amp;#160;Problem&amp;#160;Description&lt;br /&gt;
&lt;br /&gt;
The&amp;#160;syscons&amp;#160;CONS_SCRSHOT&amp;#160;ioctl&amp;#40;2&amp;#41;&amp;#160;does&amp;#160;insufficient&amp;#160;validation&amp;#160;of&lt;br /&gt;
its&amp;#160;input&amp;#160;arguments.&amp;#160;&amp;#160;In&amp;#160;particular,&amp;#160;negative&amp;#160;coordinates&amp;#160;or&amp;#160;large&lt;br /&gt;
coordinates&amp;#160;may&amp;#160;cause&amp;#160;unexpected&amp;#160;behavior.&lt;br /&gt;
&lt;br /&gt;
III.&amp;#160;Impact&lt;br /&gt;
&lt;br /&gt;
It&amp;#160;may&amp;#160;be&amp;#160;possible&amp;#160;to&amp;#160;cause&amp;#160;the&amp;#160;CONS_SCRSHOT&amp;#160;ioctl&amp;#160;to&amp;#160;return&amp;#160;portions&amp;#160;of&lt;br /&gt;
kernel&amp;#160;memory.&amp;#160;&amp;#160;Such&amp;#160;memory&amp;#160;might&amp;#160;contain&amp;#160;sensitive&amp;#160;information,&amp;#160;such&amp;#160;as&lt;br /&gt;
portions&amp;#160;of&amp;#160;the&amp;#160;file&amp;#160;cache&amp;#160;or&amp;#160;terminal&amp;#160;buffers.&amp;#160;&amp;#160;This&amp;#160;information&amp;#160;might&lt;br /&gt;
be&amp;#160;directly&amp;#160;useful,&amp;#160;or&amp;#160;it&amp;#160;might&amp;#160;be&amp;#160;leveraged&amp;#160;to&amp;#160;obtain&amp;#160;elevated&lt;br /&gt;
privileges&amp;#160;in&amp;#160;some&amp;#160;way.&amp;#160;&amp;#160;For&amp;#160;example,&amp;#160;a&amp;#160;terminal&amp;#160;buffer&amp;#160;might&amp;#160;include&amp;#160;a&lt;br /&gt;
user-entered&amp;#160;password.&lt;br /&gt;
&lt;br /&gt;
IV.&amp;#160;&amp;#160;Workaround&lt;br /&gt;
&lt;br /&gt;
There&amp;#160;is&amp;#160;no&amp;#160;known&amp;#160;workaround.&amp;#160;&amp;#160;However,&amp;#160;this&amp;#160;bug&amp;#160;is&amp;#160;only&amp;#160;exploitable&lt;br /&gt;
by&amp;#160;users&amp;#160;who&amp;#160;have&amp;#160;access&amp;#160;to&amp;#160;the&amp;#160;physical&amp;#160;console&amp;#160;or&amp;#160;can&amp;#160;otherwise&amp;#160;open&lt;br /&gt;
a&amp;#160;/dev/ttyv&amp;#42;&amp;#160;device&amp;#160;node.&lt;br /&gt;
&lt;br /&gt;
V.&amp;#160;&amp;#160;&amp;#160;Solution&lt;br /&gt;
&lt;br /&gt;
Perform&amp;#160;one&amp;#160;of&amp;#160;the&amp;#160;following&amp;#58;&lt;br /&gt;
&lt;br /&gt;
1&amp;#41;&amp;#160;Upgrade&amp;#160;your&amp;#160;vulnerable&amp;#160;system&amp;#160;to&amp;#160;the&amp;#160;RELENG_5_2&amp;#160;security&amp;#160;branch&lt;br /&gt;
dated&amp;#160;after&amp;#160;the&amp;#160;correction&amp;#160;date.&lt;br /&gt;
&lt;br /&gt;
2&amp;#41;&amp;#160;To&amp;#160;patch&amp;#160;your&amp;#160;present&amp;#160;system&amp;#58;&lt;br /&gt;
&lt;br /&gt;
The&amp;#160;following&amp;#160;patches&amp;#160;have&amp;#160;been&amp;#160;verified&amp;#160;to&amp;#160;apply&amp;#160;to&amp;#160;FreeBSD&amp;#160;5.2&lt;br /&gt;
systems.&lt;br /&gt;
&lt;br /&gt;
a&amp;#41;&amp;#160;Download&amp;#160;the&amp;#160;relevant&amp;#160;patch&amp;#160;from&amp;#160;the&amp;#160;location&amp;#160;below,&amp;#160;and&amp;#160;verify&amp;#160;the&lt;br /&gt;
detached&amp;#160;PGP&amp;#160;signature&amp;#160;using&amp;#160;your&amp;#160;PGP&amp;#160;utility.&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;fetch&amp;#160;ftp&amp;#58;//ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-04&amp;#58;15/syscons.patch&lt;br /&gt;
#&amp;#160;fetch&amp;#160;ftp&amp;#58;//ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-04&amp;#58;15/syscons.patch.asc&lt;br /&gt;
&lt;br /&gt;
b&amp;#41;&amp;#160;Apply&amp;#160;the&amp;#160;patch.&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;cd&amp;#160;/usr/src&lt;br /&gt;
#&amp;#160;patch&amp;#160;&amp;#60;&amp;#160;/path/to/patch&lt;br /&gt;
&lt;br /&gt;
c&amp;#41;&amp;#160;Recompile&amp;#160;your&amp;#160;kernel&amp;#160;as&amp;#160;described&amp;#160;in&lt;br /&gt;
&amp;#60;URL&amp;#58;http&amp;#58;//www.freebsd.org/handbook/kernelconfig.html&amp;#62;&amp;#160;and&amp;#160;reboot&amp;#160;the&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
VI.&amp;#160;&amp;#160;Correction&amp;#160;details&lt;br /&gt;
&lt;br /&gt;
The&amp;#160;following&amp;#160;list&amp;#160;contains&amp;#160;the&amp;#160;revision&amp;#160;numbers&amp;#160;of&amp;#160;each&amp;#160;file&amp;#160;that&amp;#160;was&lt;br /&gt;
corrected&amp;#160;in&amp;#160;FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Branch&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Revision&lt;br /&gt;
&amp;#160;Path&lt;br /&gt;
-&amp;#160;-------------------------------------------------------------------------&lt;br /&gt;
RELENG_5_2&lt;br /&gt;
&amp;#160;src/UPDATING&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.282.2.19&lt;br /&gt;
&amp;#160;src/sys/conf/newvers.sh&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.56.2.18&lt;br /&gt;
&amp;#160;src/sys/dev/syscons/syscons.c&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;1.409.2.1&lt;br /&gt;
-&amp;#160;-------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
VII.&amp;#160;References&lt;br /&gt;
&lt;br /&gt;
&amp;#60;URL&amp;#58;http&amp;#58;//cvsweb.freebsd.org/src/sys/dev/syscons/syscons.c.diff?r1=1.428&amp;amp;r2=1.429&amp;#62;&lt;/div&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Tue, 05 Oct 2004 00:18:07 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/159-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>FreeBSD Security Advisory - Various CVS Server Related Vulnerabilities</title>
    <link>http://freebsd.munk.me.uk/archives/158-FreeBSD-Security-Advisory-Various-CVS-Server-Related-Vulnerabilities.html</link>
            <category>FreeBSD</category>
            <category>Security</category>
    
    <comments>http://freebsd.munk.me.uk/archives/158-FreeBSD-Security-Advisory-Various-CVS-Server-Related-Vulnerabilities.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=158</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=158</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    I.   Background&lt;br /&gt;
&lt;br /&gt;
The Concurrent Versions System (CVS) is a version control system.  It&lt;br /&gt;
may be used to access a repository locally, or to access a `remote&lt;br /&gt;
repository&#039; using a number of different methods.  When accessing a&lt;br /&gt;
remote repository, the target machine runs the CVS server to fulfill&lt;br /&gt;
client requests.&lt;br /&gt;
&lt;br /&gt;
II.  Problem Description&lt;br /&gt;
&lt;br /&gt;
A number of vulnerabilities were discovered in CVS by Stefan Esser,&lt;br /&gt;
Sebastian Krahmer, and Derek Price.&lt;br /&gt;
&lt;br /&gt;
 . Insufficient input validation while processing &quot;Entry&quot; lines.&lt;br /&gt;
   (CAN-2004-0414)&lt;br /&gt;
&lt;br /&gt;
 . A double-free resulting from erroneous state handling while&lt;br /&gt;
   processing &quot;Argumentx&quot; commands. (CAN-2004-0416)&lt;br /&gt;
&lt;br /&gt;
 . Integer overflow while processing &quot;Max-dotdot&quot; commands.&lt;br /&gt;
   (CAN-2004-0417)&lt;br /&gt;
&lt;br /&gt;
 . Erroneous handling of empty entries handled while processing&lt;br /&gt;
   &quot;Notify&quot; commands. (CAN-2004-0418)&lt;br /&gt;
&lt;br /&gt;
 . A format string bug while processing CVS wrappers.&lt;br /&gt;
&lt;br /&gt;
 . Single-byte buffer underflows while processing configuration files&lt;br /&gt;
   from CVSROOT.&lt;br /&gt;
&lt;br /&gt;
 . Various other integer overflows.&lt;br /&gt;
&lt;br /&gt;
Additionally, iDEFENSE reports an undocumented command-line flag used&lt;br /&gt;
in debugging does not perform input validation on the given path&lt;br /&gt;
names.&lt;br /&gt;
&lt;br /&gt;
III. Impact&lt;br /&gt;
&lt;br /&gt;
CVS servers (&quot;cvs server&quot; or :pserver: modes) are affected by these&lt;br /&gt;
vulnerabilities.  They vary in impact but include information disclosure&lt;br /&gt;
(the iDEFENSE-reported bug), denial-of-service (CAN-2004-0414,&lt;br /&gt;
CAN-2004-0416, CAN-2004-0417 and other bugs), or possibly arbitrary code&lt;br /&gt;
execution (CAN-2004-0418).  In very special situations where the&lt;br /&gt;
attacker may somehow influence the contents of CVS configuration files&lt;br /&gt;
in CVSROOT, additional attacks may be possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See the extended article for the complete advisory.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://freebsd.munk.me.uk/archives/158-FreeBSD-Security-Advisory-Various-CVS-Server-Related-Vulnerabilities.html#extended&quot;&gt;Continue reading &quot;FreeBSD Security Advisory - Various CVS Server Related Vulnerabilities&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 20 Sep 2004 16:19:31 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/158-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Advanced FreeBSD last Command</title>
    <link>http://freebsd.munk.me.uk/archives/150-Advanced-FreeBSD-last-Command.html</link>
            <category>FreeBSD</category>
    
    <comments>http://freebsd.munk.me.uk/archives/150-Advanced-FreeBSD-last-Command.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=150</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=150</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Most Unix/BSD/Linux type systems have a &#039;last&#039; command that allows you to see easily who was last logged into the server.  See &lt;a href=&quot;http://www.freebsd.org/cgi/man.cgi?query=last&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+5.2-RELEASE+and+Ports&amp;format=html&quot;&gt;here&lt;/a&gt; for an overview of FreeBSD&#039;s last command.&lt;br /&gt;
&lt;br /&gt;
The last command relies on getting it&#039;s information from the wtmp file - usually stored in /var/log/wtmp.  This means that when the wtmp file is rotated, issuing a last command will only display login details since the time wtmp was rotated last.  This can be annoying when you need to find out &lt;b&gt;all&lt;/b&gt; the times that a user was logged in last - over the last few years say, not just over the last few days.&lt;br /&gt;
&lt;br /&gt;
As a solution to this problem I wrote a simple shell script to display last information not only based on the current wtmp file, but also from backed up wtmp files as well.  The help output looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;&amp;#91;6&amp;#58;55&amp;#58;28&amp;#93;&amp;#160;root@users&amp;#160;/opt#&amp;#160;last_all&lt;br /&gt;
last_all&amp;#160;&amp;#91;-a|-l&amp;#93;&lt;br /&gt;
Display&amp;#160;last&amp;#160;login&amp;#160;information.&lt;br /&gt;
-a&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Display&amp;#160;all&amp;#160;last&amp;#160;login&amp;#160;info&amp;#160;on&amp;#160;record&lt;br /&gt;
-l&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Display&amp;#160;the&amp;#160;last&amp;#160;login&amp;#160;dates&amp;#160;per&amp;#160;user&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
See the extended entry to view the script. &lt;br /&gt;&lt;a href=&quot;http://freebsd.munk.me.uk/archives/150-Advanced-FreeBSD-last-Command.html#extended&quot;&gt;Continue reading &quot;Advanced FreeBSD last Command&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 24 Aug 2004 06:00:10 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/150-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Server has a hissy fit</title>
    <link>http://freebsd.munk.me.uk/archives/126-Server-has-a-hissy-fit.html</link>
            <category>FreeBSD</category>
    
    <comments>http://freebsd.munk.me.uk/archives/126-Server-has-a-hissy-fit.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=126</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=126</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Well, I&#039;m baffled, the server just had a total hissy fit and fell down in a ball of nervous cyber tension and had to be cold rebooted - hit that reset switch baby...  not had to do that for literally years on this box.  Hoping it&#039;s not a sign of impending hardware failure...&lt;br /&gt;
&lt;br /&gt;
Just before resorting to the magic finger reset button technique (pure BOFH stylee), saw a *lot* of messages about the HDD failing and then when I rebooted, the HDD wouldn&#039;t get detected until I unplugged the IDE cable from the controller and reinserted it... odd. 
    </content:encoded>

    <pubDate>Mon, 22 Mar 2004 20:00:46 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/126-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Denial of Service OpenSSL Vulnerability</title>
    <link>http://freebsd.munk.me.uk/archives/118-Denial-of-Service-OpenSSL-Vulnerability.html</link>
            <category>FreeBSD</category>
    
    <comments>http://freebsd.munk.me.uk/archives/118-Denial-of-Service-OpenSSL-Vulnerability.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=118</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=118</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Joy.  I was just browsing through bugtraq when I noticed a fairly major looking &lt;a href=&quot;http://marc.theaimsgroup.com/?l=bugtraq&amp;m=107953412903636&amp;w=2&quot;&gt;security release&lt;/a&gt;.  Hrm I thought... wonder why that hasn&#039;t hit the freebsd-security list yet?  Wishful thinking... within literally a minute as I moved onto the freebsd-security list, sure enough there was a security announcement about the problem... time to makeworld :P&lt;br /&gt;
&lt;br /&gt;
Curious, I seem to have caught this very early, the post to the freebsd-security list doesn&#039;t appear to have made it to the &lt;a href=&quot;http://marc.theaimsgroup.com/?l=freebsd-security&amp;r=1&amp;b=200403&amp;w=2&quot;&gt;MARC archives&lt;/a&gt; yet... by the time anyone reads this no doubt it will have though :P 
    </content:encoded>

    <pubDate>Wed, 17 Mar 2004 17:18:36 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/118-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>BSD Family Tree</title>
    <link>http://freebsd.munk.me.uk/archives/117-BSD-Family-Tree.html</link>
            <category>FreeBSD</category>
    
    <comments>http://freebsd.munk.me.uk/archives/117-BSD-Family-Tree.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=117</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=117</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Just spent ages doing silly stuff like &#039;locate map&#039; or &#039;locate bsd&#039; to try and find a map of the BSD Family Tree.  I&#039;d seen it before a long long time ago, but for the life of me couldn&#039;t remember where it was.&lt;br /&gt;
&lt;br /&gt;
For the record you can view it in the local file system under FreeBSD here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://freebsd.munk.me.uk/downloads/bsd-family-tree&quot;&gt;/usr/share/misc/bsd-family-tree&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve copied it into the docroot, you can view it online here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://freebsd.munk.me.uk/downloads/bsd-family-tree&quot;&gt;BSD Family Tree&lt;/a&gt; 
    </content:encoded>

    <pubDate>Wed, 17 Mar 2004 16:50:57 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/117-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>More FreeBSD Shell Scripts</title>
    <link>http://freebsd.munk.me.uk/archives/116-More-FreeBSD-Shell-Scripts.html</link>
            <category>FreeBSD</category>
    
    <comments>http://freebsd.munk.me.uk/archives/116-More-FreeBSD-Shell-Scripts.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=116</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=116</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    &lt;a href=&quot;http://www103.pair.com/parv/comp/src/&quot;&gt;http://www103.pair.com/parv/comp/src/&lt;/a&gt; - a number of interesting shell scripts mostly specific to FreeBSD.&lt;br /&gt;
&lt;br /&gt;
The guy&#039;s name who authored these scripts - Parv - I recognize from the freebsd-questions list and possibly(?) exim-users as well... small world.&lt;br /&gt;
&lt;br /&gt;
Incidentally I came across the list of scripts via &lt;a href=&quot;http://freebsd.amazingdev.com/blog/archives/000105.html&quot;&gt;an entry&lt;/a&gt; in another weblog by Jonathan Arnold called &lt;a href=&quot;http://freebsd.amazingdev.com/blog/&quot;&gt;Daemon Dancing in the Dark, a FreeBSD weblog&lt;/a&gt; - very similar to this one - check it out :P 
    </content:encoded>

    <pubDate>Wed, 17 Mar 2004 13:25:55 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/116-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Using mtree to Restore File Permissions</title>
    <link>http://freebsd.munk.me.uk/archives/113-Using-mtree-to-Restore-File-Permissions.html</link>
            <category>FreeBSD</category>
    
    <comments>http://freebsd.munk.me.uk/archives/113-Using-mtree-to-Restore-File-Permissions.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=113</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=113</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Messing up the filesystem by badly executed chmod commands is a pain in the butt.  Luckily there&#039;s a tool called mtree on FreeBSD that can help out in restoring the file permissions to some of the base file systems.&lt;br /&gt;
&lt;br /&gt;
There&#039;s a great post here by Matthew Seaman about using mtree:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://marc.theaimsgroup.com/?l=freebsd-questions&amp;m=107550476912218&amp;w=2&quot;&gt;Using mtree to correct file system perm problems&lt;/a&gt; 
    </content:encoded>

    <pubDate>Wed, 03 Mar 2004 03:46:52 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/113-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>

</channel>
</rss>