<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.1" -->
<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/"
	>

<channel>
	<title>BSDspot</title>
	<link>http://www.bsdspot.com/blog</link>
	<description>FreeBSD Systems Administration</description>
	<pubDate>Sat, 09 Aug 2008 15:38:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1</generator>
	<language>en</language>
			<item>
		<title>Pidgin 2.4.3 Debian Lenny</title>
		<link>http://www.bsdspot.com/blog/archives/35</link>
		<comments>http://www.bsdspot.com/blog/archives/35#comments</comments>
		<pubDate>Fri, 08 Aug 2008 13:32:39 +0000</pubDate>
		<dc:creator>BSDSpot</dc:creator>
		
		<category><![CDATA[Installing Software]]></category>

		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.bsdspot.com/blog/archives/35</guid>
		<description><![CDATA[Ok, I know pidgin binaries are available for Lenny, but let&#8217;s build Pidgin 2.4.3 from source anyway&#8230; Lenny will be the new &#8220;stable&#8221; soonish (September?) and the Pidgin team don&#8217;t provide Debian binaries for stable.  
(This will probably work on etch. I posted build instructions here for Pidgin 2.4.1 a while back. The configure [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, I know pidgin binaries are available for Lenny, but let&#8217;s build Pidgin 2.4.3 from source anyway&#8230; Lenny will be the new &#8220;stable&#8221; soonish (September?) and the Pidgin team don&#8217;t provide Debian binaries for stable.  </p>
<p>(This will probably work on etch. I posted build instructions <a href="http://www.bsdspot.com/blog/archives/33">here</a> for Pidgin 2.4.1 a while back. The configure script in that case was more lenient with respect to dependencies than the current 2.4.3 configure script.) </p>
<h1>Before you build</h1>
<h2>Required stuff <em>(For a minimal install.)</em></h2>
<p><code>apt-get install gettext libglib2.0-dev libgtk2.0-dev libxml2-dev libxml-perl libperl-dev</code></p>
<p>We need this if we&#8217;re going to use MSN or Google talk since they need ssl (Pidgin uses the gnutls ssl libraries)</p>
<p><code>apt-get install libgnutls-dev</code> </p>
<h2>Optional Stuff <em>(Probably a good idea to install these.)</em></h2>
<p>Spell checking<br />
<code>apt-get install libgtkspell-dev</code> </p>
<p>X Screen Saver extension (needed for determining idle time from mouse and keyboard use)<br />
<code>apt-get install libxss-dev</code></p>
<p>Startup notification (visual feedback of startup)<br />
<code>apt-get install libstartup-notification0-dev</code></p>
<p>Sound support<br />
<code>apt-get install libgstreamer0.10-dev</code></p>
<h2>More optional stuff <em>(Install these if you need them.)</em></h2>
<p>Tcl/Tk support (if you need tcl/tk scripting)<br />
<code>apt-get install tcl-dev tk-dev</code></p>
<p>Meanwhile support (Lotus Sametime support)<br />
<code>apt-get install libmeanwhile-dev</code></p>
<p>Avahi support (for Bonjour)<br />
<code>apt-get install libavahi-glib-dev</code></p>
<p>D-bus support (message bus support)<br />
<code>apt-get install libdbus-glib-1-dev</code> </p>
<p>NetworkManager support (A D-Bus service providing connection management and selection of best available connection).<br />
<code>apt-get install network-manager-dev</code></p>
<h1> Build and Install</h1>
<p>Download the source package from <a href="http://downloads.sourceforge.net/pidgin/pidgin-2.4.3.tar.bz2">http://downloads.sourceforge.net/pidgin/pidgin-2.4.3.tar.bz2</a></p>
<p><strong>Unpack pidgin</strong><br />
<code>tar jxvf pidgin-2.4.3.tar.bz2</code></p>
<p><strong>Configure</strong><br />
<code><br />
cd pidgin-2.4.3<br />
./configure</code></p>
<p>You can pass the following options to configure if you want to disable things you don&#8217;t need</p>
<p><code>  --disable-gtkui</code>         compile without GTK+ user interface<br />
<code>  --disable-consoleui </code>    compile without console user interface<br />
<code>  --disable-screensaver</code>   compile without X screensaver extension<br />
<code>  --disable-sm</code>                      compile without X session management support<br />
<code>  --disable-startup-notification</code> compile without startup notification support<br />
<code>  --disable-gtkspell </code>               compile without GtkSpell automatic spell checking<br />
<code>  --disable-gstreamer </code>    compile without GStreamer audio support<br />
<code>  --disable-meanwhile</code>     compile without meanwhile<br />
<code>  --disable-avahi </code>        compile without avahi<br />
<code>  --disable-nm </code>            compile without NetworkManager support</p>
<p>(To see all available options <code>./configure --help</code>)</p>
<p><strong>Build and install</strong></p>
<p><code>make<br />
su<br />
make install</code></p>
<p>Pidgin is then at <code>/usr/local/bin/pidgin</code></p>
<p>(Actually I do the whole install as root.)  </p>
<h1>Caveats</h1>
<ol>
<li>It&#8217;s a good idea to uninstall any previous version of pidgin, if you installed binaries, do an<code> apt-get remove --purge pidgin</code></li>
<li>Keep the source/build tree! Tar and gzip it, then put it somewhere safe. In the future you might want to upgrade pidgin. To do it cleanly, issue a <code>make uninstall</code> from the build directory. Apparently, <code>make uninstall</code> needs to know which options were passed to <code>./configure</code> to uninstall pidgin properly.
<p>Alternatively, note down the options you passed to <code>./configure</code>, download the old source tarball, unpack and run <code>./configure</code> with the options you used to build, then do a <code>make uninstall</code>.</li>
<li>You might need to run <code>ldconfig</code> after install if you get this error when you try to run  pidgin<br />
<code>pidgin: error while loading shared libraries: libpurple.so.0: cannot open shared object file: No such file or directory</code>
       </li>
<li>This might work on Ubuntu, I haven&#8217;t tried it.</li>
<li>I doubt anyone will need this informaton until Lenny becomes stable. If you aren&#8217;t comfortable building from source, use a binary.
        </li>
<li>Substitute <code>sudo</code> for <code>su</code> if that&#8217;s your thing.
</li>
</ol>
<p>I did the final build with<br />
<code><br />
./configure --disable-meanwhile --disable-avahi --disable-dbus<br />
</code><br />
but built it with these enabled while testing dependencies.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdspot.com/blog/archives/35/feed/</wfw:commentRss>
		</item>
		<item>
		<title>keepass debian etch</title>
		<link>http://www.bsdspot.com/blog/archives/34</link>
		<comments>http://www.bsdspot.com/blog/archives/34#comments</comments>
		<pubDate>Sat, 15 Dec 2007 17:59:13 +0000</pubDate>
		<dc:creator>BSDSpot</dc:creator>
		
		<category><![CDATA[Installing Software]]></category>

		<guid isPermaLink="false">http://www.bsdspot.com/blog/archives/34</guid>
		<description><![CDATA[1. KeePassX depends on the Qt libraries so fetch the necessary dependencies first
apt-get install libqt4-core libqt4-gui libpng3
2. Get the debian package from http://www.keepassx.org/downloads
3. Install it
dpkg -i KeePassX-0.2.2.deb
]]></description>
			<content:encoded><![CDATA[<p>1. KeePassX depends on the Qt libraries so fetch the necessary dependencies first</p>
<p><code>apt-get install libqt4-core libqt4-gui libpng3</code></p>
<p>2. Get the debian package from http://www.keepassx.org/downloads</p>
<p>3. Install it</p>
<p><code>dpkg -i KeePassX-0.2.2.deb</code><code></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdspot.com/blog/archives/34/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pidgin debian etch</title>
		<link>http://www.bsdspot.com/blog/archives/33</link>
		<comments>http://www.bsdspot.com/blog/archives/33#comments</comments>
		<pubDate>Thu, 25 Oct 2007 07:40:10 +0000</pubDate>
		<dc:creator>BSDSpot</dc:creator>
		
		<category><![CDATA[Installing Software]]></category>

		<guid isPermaLink="false">http://www.bsdspot.com/blog/archives/33</guid>
		<description><![CDATA[We need these to build it
apt-get install gettext libglib2.0-dev libgtk2.0-dev libxml2-dev
perl-xml libraries may also be needed
apt-get install libxml-perl
To build it with ssl (needed for msn and google talk), we need the gnutls development headers
apt-get install libgnutls-dev
Get the source 
http://superb-east.dl.sourceforge.net/sourceforge/pidgin/pidgin-2.3.1.tar.bz2
Build it
tar jxvf pidgin-2.3.1.tar.bz2
cd pidgin-2.3.1
./configure --enable-gnutls=yes
make
make install
pidgin is at /usr/local/bin/pidgin
]]></description>
			<content:encoded><![CDATA[<p>We need these to build it</p>
<p><code>apt-get install gettext libglib2.0-dev libgtk2.0-dev libxml2-dev</code></p>
<p>perl-xml libraries may also be needed</p>
<p><code>apt-get install libxml-perl</code></p>
<p>To build it with ssl (needed for msn and google talk), we need the gnutls development headers</p>
<p><code>apt-get install libgnutls-dev</code></p>
<p>Get the source </p>
<p>http://superb-east.dl.sourceforge.net/sourceforge/pidgin/pidgin-2.3.1.tar.bz2</p>
<p>Build it</p>
<p><code>tar jxvf pidgin-2.3.1.tar.bz2<br />
cd pidgin-2.3.1<br />
./configure --enable-gnutls=yes<br />
make<br />
make install</code></p>
<p>pidgin is at /usr/local/bin/pidgin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdspot.com/blog/archives/33/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FreeBSD Firefox Flash Java</title>
		<link>http://www.bsdspot.com/blog/archives/31</link>
		<comments>http://www.bsdspot.com/blog/archives/31#comments</comments>
		<pubDate>Sun, 03 Jun 2007 05:32:14 +0000</pubDate>
		<dc:creator>BSDSpot</dc:creator>
		
		<category><![CDATA[Installing Software]]></category>

		<category><![CDATA[Systems Administration]]></category>

		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.bsdspot.com/blog/archives/31</guid>
		<description><![CDATA[I&#8217;ve tried to get Flash working with Firefox on FreeBSD a number of times, but haven&#8217;t been able to get it just right until recently. 
I&#8217;m using,
FreeBSD 6.1-RELEASE #0: Sun May  7 04:32:43 UTC 2006
with
firefox-2.0_2,1.
The following worked for me (Thanks to a post from Lluis López: here).
1. First install linuxpluginwrapper from the ports tree:

cd [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tried to get Flash working with Firefox on FreeBSD a number of times, but haven&#8217;t been able to get it just right until recently. </p>
<p>I&#8217;m using,<br />
<code>FreeBSD 6.1-RELEASE #0: Sun May  7 04:32:43 UTC 2006</code><br />
with<br />
<code>firefox-2.0_2,1</code>.</p>
<p>The following worked for me (Thanks to a post from Lluis López: <a href="http://daemonnews.org/mailinglists/FreeBSD/freebsd-multimedia/msg19073.html">here</a>).</p>
<p>1. First install <code>linuxpluginwrapper</code> from the ports tree:</p>
<blockquote><p>
cd usr/ports/www/linuxpluginwrapper<br />
make<br />
make install<br />
make clean
</p></blockquote>
<p>2. Now go to /usr/src and get <a href="http://people.freebsd.org/~nork/rtld_dlsym_hack.diff">this patch</a> and patch </p>
<blockquote><p>cd /usr/src<br />
patch < /home/work/rtld_dlsym_hack.diff<br />
cd libexec/rtld-elf<br />
make clean<br />
make<br />
make install</p></blockquote>
<p>Substitute the correct path above !! (I downloaded the patch to /home/work/).</p>
<p>This assumes you have sources installed. If the tree under /usr/src is empty, then</p>
</blockquote>
<blockquote><p>sysinstall</p></blockquote>
<p>[configure >> distributions >> src >> all ]</p>
<p>See <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/using-sysinstall.html">The FreeBSD handbook</a> if you&#8217;ve forgotten how to use sysinstall.</p>
<p>3. Install <code>linux-flashplugin7</code></p>
<blockquote><p>
cd /usr/ports/www/linux-flashplugin7<br />
make<br />
make install<br />
make clean
</p></blockquote>
<p>4. Copy /usr/local/share/examples/linuxpluginwrapper/libmap.conf-FreeBSD6 to /etc/libmap.conf </p>
<blockquote><p>
cp /usr/local/share/examples/linuxpluginwrapper/libmap.conf-FreeBSD6 /etc/libmap.conf
</p></blockquote>
<p>No need to edit /etc/libmap.conf.</p>
<p>5. Add symlinks in /usr/local/lib/browser_plugins to libflashplayer.so and flashplayer.xpt to</p>
<blockquote><p>
cd /usr/local/lib/browser_plugins<br />
ln -s /usr/X11R6/lib/linux-mozilla/plugins/libflashplayer.so .<br />
ln -s /usr/X11R6/lib/linux-mozilla/plugins/flashplayer.xpt .
</p></blockquote>
<p>6. Restart your browser, and navigate to about:plugins, you should see shockwave_flash listed:</p>
<div class="plugname"><p><strong>Shockwave Flash</strong></div>
<dl>
<dd><span class="label">File name:</span><br />
libflashplayer.so</dd>
<dd>
Shockwave Flash 7.0 r69</dd>
</dl>
<table class="contenttable">
<thead>
<tr>
<th class="type">MIME Type</th>
<th class="desc">Description</th>
<th class="suff">Suffixes</th>
<th class="enabled">Enabled</th>
</tr>
</thead>
<tbody>
<tr>
<td>application/x-shockwave-flash</td>
<td>Shockwave Flash</td>
<td>swf</td>
<td>Yes</td>
</tr>
<tr>
<td>application/futuresplash</td>
<td>FutureSplash Player</td>
<td>spl</td>
<td>Yes</td>
</tr>
</tbody>
</table>
<p>7. Install javavmwrapper</p>
<p>Before we can install Java (I&#8217;m using the diablo-jdk from the <a href="http://www.freebsdfoundation.org">FreeBSD Foundation</a> in this example) we need to install <code>javavmwrapper</code> from ports.  </p>
<blockquote><p>
cd /usr/ports/java/javavmwrapper/<br />
make<br />
make install<br />
make clean
</p></blockquote>
<p>8. Now we can install Java. Download the appropriate JDK package from <a href="http://www.freebsdfoundation.org/downloads/java.shtml">The FreeBSD foundation</a> and simply issue a <code>pkg_add</code>.</p>
<p>In my case, </p>
<blockquote><p>pkg_add diablo-jdk-freebsd6.i386.1.5.0.07.01.tbz </p></blockquote>
<p>8. We need to add a symlink in /usr/local/lib/browser to <code>/usr/local/diablo-jdk1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so</code></p>
<blockquote><p>
cd /usr/local/lib/browser_plugins<br />
ln -s /usr/local/diablo-jdk1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so .
</p></blockquote>
<p>9. Restart your browser and navigate to about:plugins you should see </p>
<div class="plugname"><p><strong>Java(TM) Plug-in diablo-1.5.0-b01</strong></div>
<dl>
<dd><span class="label">File name:</span> </p>
<p>libjavaplugin_oji.so</dd>
<dd>
Java(TM) Plug-in 1.5.0</dd>
</dl>
<table class="contenttable">
<thead>
<tr>
<th class="type">MIME Type</th>
<th class="desc">Description</th>
<th class="suff">Suffixes</th>
<th class="enabled">Enabled</th>
</tr>
</thead>
<tbody>
<tr>
<td>application/x-java-vm</td>
<td>Java</td>
<td></td>
<td>Yes</td>
</tr>
<tr>
<td>application/x-java-applet</td>
<td>Java</td>
<td></td>
<td>Yes</td>
</tr>
<tr>
<td>application/x-java-applet;version=1.1</td>
<td>Java</td>
<td></td>
<td>Yes</td>
</tr>
<tr>
<td>application/x-java-applet;version=1.1.1</td>
<td>Java</td>
<td></td>
<td>Yes</td>
</tr>
<tr>
<td>application/x-java-applet;version=1.1.2</td>
<td>Java</td>
<td></td>
<td>Yes</td>
</tr>
<tr>
<td colspan="4" align="center"> &#8230; snipped &#8230; </td>
</tr>
<tr>
<td>application/x-java-bean;jpi-version=1.5</td>
<td>Java</td>
<td></td>
<td>Yes</td>
</tr>
</tbody>
</table>
<p><hr /></p>
<p>I tested the Java install by trying the <a href="http://www.schubart.net/rc/">Rubik&#8217;s Cube Java Applet</a>. It worked without problems.</p>
<p>Verifiying the Java installation at <a href="http://java.com/en/download/installed.jsp">Sun&#8217;s site</a> gives a (soft) error:</p>
<blockquote><p>Oops! You don&#8217;t have the recommended Java installed.<br />
Your Java version is 1.5.0. Please click the button below to get the recommended Java for your computer.  </p></blockquote>
<p>It does however verify that Java version 1.5.0 is installed.</p>
<p><hr /></p>
<p>Addendum: An alternative way to install Flash for Firefox, that bypasses the Linux compatibility layer altogether is to use the GNU Flash movie player<code>gnash</code>.</p>
<blockquote><p>
cd /usr/ports/graphics/gnash/<br />
make<br />
make install<br />
make clean
</p></blockquote>
<p>Thanks to Matteo at <a href="http://www.riondabsd.net/2007/05/23/flash-on-freebsd-using-gnash/">Matteo&#8217;s Wasps&#8217; Nest</a> for this one. See his post for more details.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdspot.com/blog/archives/31/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Java on FreeBSD</title>
		<link>http://www.bsdspot.com/blog/archives/25</link>
		<comments>http://www.bsdspot.com/blog/archives/25#comments</comments>
		<pubDate>Thu, 04 May 2006 03:29:28 +0000</pubDate>
		<dc:creator>BSDSpot</dc:creator>
		
		<category><![CDATA[Installing Software]]></category>

		<category><![CDATA[Systems Administration]]></category>

		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://bsdspot.com/?p=25</guid>
		<description><![CDATA[I just installed Java on my FreeBSD box. In the past it has been a nightmare to install Java due to licensing issues - BUT - the FreeBSD Foundation has negotiated a license with Sun to distribute JRE and JDK binaries for FreeBSD.
Installation is now very easy!  Download the appropriate package from here and [...]]]></description>
			<content:encoded><![CDATA[<p>I just installed Java on my FreeBSD box. In the past it has been a nightmare to install Java due to licensing issues - BUT - the <a href="http://www.freebsdfoundation.org">FreeBSD Foundation</a> has negotiated a license with Sun to distribute JRE and JDK binaries for FreeBSD.</p>
<p>Installation is now very easy!  Download the appropriate package from <a href="http://www.freebsdfoundation.org/downloads/java.shtml">here</a> and simply issue a <code>pkg_add</code>.</p>
<p>In my case it was  </p>
<blockquote><p>pkg_add diablo-jdk-freebsd6.i386.1.5.0.07.01.tbz </p></blockquote>
<p>(I am currently running FreeBSD 6.1).</p>
<p>My installation baulked because <code>javavmwrapper</code> was not installed.  A simple install from ports was all that was needed (it is a small package).</p>
<blockquote><p>
cd /usr/ports/java/javavmwrapper/<br />
make<br />
make install<br />
make clean
</p></blockquote>
<p>After this I ran pkg_add again and the install went through without incident. It sure beats compiling the whole thing from sources. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdspot.com/blog/archives/25/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Stopping qmail</title>
		<link>http://www.bsdspot.com/blog/archives/24</link>
		<comments>http://www.bsdspot.com/blog/archives/24#comments</comments>
		<pubDate>Wed, 15 Mar 2006 11:20:40 +0000</pubDate>
		<dc:creator>BSDSpot</dc:creator>
		
		<category><![CDATA[Systems Administration]]></category>

		<category><![CDATA[Qmail]]></category>

		<guid isPermaLink="false">http://bsdspot.com/?p=24</guid>
		<description><![CDATA[There are plenty of times that you need to stop Qmail for maintainence purposes.
The qmailctl script generally does a good job of stopping qmail, but sometimes it does not quite shutdown all of the qmail processes.
[root@here]# qmailctl stop
Stopping qmail&#8230;
  qmail-smtpd
  qmail-send

[root@here]# qmailctl stat
/service/qmail-send: up (pid 32436) 358918 seconds, want down
/service/qmail-send/log: down 3 seconds, [...]]]></description>
			<content:encoded><![CDATA[<p>There are plenty of times that you need to stop Qmail for maintainence purposes.</p>
<p>The <code>qmailctl</code> script generally does a good job of stopping qmail, but sometimes it does not quite shutdown all of the qmail processes.</p>
<blockquote><p>[root@here]# <code>qmailctl stop</code><br />
Stopping qmail&#8230;<br />
  qmail-smtpd<br />
  qmail-send</p></blockquote>
<blockquote><p>
[root@here]# <code>qmailctl stat</code><br />
/service/qmail-send: up (pid 32436) 358918 seconds, want down<br />
/service/qmail-send/log: down 3 seconds, normally up<br />
/service/qmail-smtpd: down 3 seconds, normally up<br />
/service/qmail-smtpd/log: down 3 seconds, normally up<br />
messages in queue: 142<br />
messages in queue but not yet preprocessed: 0</p></blockquote>
<p>As you can see from the output of qmailctl stat, the qmail-send program is still running.  If you do a<sup>[1]</sup> </p>
<p><code>ps waux | grep qmail | grep -v grep</code></p>
<p>you will often find output like</p>
<blockquote><p>
[root@here]# <code>psq</code><br />
root     55033  0.0  0.1  1196   480  ??  I    Tue05PM   0:00.01 supervise qmail-send<br />
qmails   55035  0.0  0.1  1340   760  ??  I    Tue05PM   1:28.27 qmail-send<br />
root     55036  0.0  0.1  1196   480  ??  I    Tue05PM   0:00.01 supervise qmail-smtpd<br />
qmaill   55040  0.0  0.1  1224   532  ??  I    Tue05PM   0:29.48 multilog t s100000 n20 /var/log/qmail/qmail-send<br />
root     55043  0.0  0.1  1216   500  ??  I    Tue05PM   0:00.03 tcpserver -H -R -v -c100 0 110 qmail-popup<br />
root     55048  0.0  0.1  1216   548  ??  I    Tue05PM   0:00.02 qmail-lspawn ./Maildir<br />
qmailr   55049  0.0  0.1  1284   684  ??  I    Tue05PM   0:22.64 qmail-rspawn<br />
qmailq   55050  0.0  0.1  1212   544  ??  I    Tue05PM   0:04.69 qmail-clean<br />
qmailr   83484  0.0  0.2  2432  1196  ??  I     2:38AM   0:00.00 qmail-remote yahoo.com webmaster@here.com there@yahoo.com<br />
qmailr   83498  0.0  0.2  2432  1196  ??  I     2:38AM   0:00.01 qmail-remote hotmail.com webmaster@here.com you@yahoo.com
</p></blockquote>
<p>If you then run qmailctl start, you will often have the situation with <code>qmail-send</code> showing up as running for 1 second while the other qmail processes are up for much longer. Basically a second <code>qmail-send</code> is trying to start and is dying after a second. The first instance of <code>qmail-send</code> is still running and needs to be stopped.  </p>
<p>The output often contains a mixture of <code>qmail-send</code>, <code>qmail-remote,</code> <code>qmail-clean</code> and others depending on how your mail has been setup and what is in the process of being sent/received when you issue the <code>qmailctl stop</code> command.</p>
<p>At this point, we can wait a bit, to see if <code>qmail-send</code> eventually goes down or whether we will have to kill it explicitly. It is worth trying another <code>qmailctl stop</code> at this point. If <code>qmailctl stat</code> shows <code>qmail-send</code> is still up, which is often the case, it is probably time to kill <code>qmail-send</code> directly.</p>
<p>I usually do a <code>kill -9 qmail-send</code>. Then follow it with <code>psq</code> to see what is still running. Often I have to run a number of kills and killalls, such as <code>killall qmail-remote</code>. We&#8217;re not really shutting down qmail very cleanly, but sometimes, especially when you&#8217;re in a hurry it makes sense to kill things rather than wait for them to terminate.</p>
<p>Eventually only the supervise scripts should be running,</p>
<blockquote><p>
[root@work]#<code>psq</code><br />
root       561  0.0  0.0  1148   84 con- I    Sat02AM   0:00.05 supervise qmail-send<br />
root       563  0.0  0.0  1148   84 con- I    Sat02AM   0:00.06 supervise qmail-smtpd
</p></blockquote>
<p>At this stage I usually call <code>/usr/local/etc/rc.d/svscan.sh stop</code>. The location of your actual <code>svscan.sh</code> script may be different from mine.</p>
<p>A <code>psq</code> shows nothing running. A <code>sockstat -4 | grep 25</code> shows nothing listening on the smtp port. Now is the time to go in and do maintainance - such as recompile qmail, dequeue mail or repair the queue.</p>
<p>Once you&#8217;re done, starting qmail is as simple as <code>/usr/local/etc/rc.d/svscan.sh start</code>.</p>
<p><hr /><br />
[1] Actually I use this snippet quite a bit so to save time, I&#8217;ve copied it to a file called <code>psq</code> under <code>/usr/local/bin</code>  </p>
<p><code>echo "ps waux | grep qmail | grep -v grep" > /usr/local/bin/psq</code></p>
<p>so that simply typing <code>psq</code> gives me a list of all the running qmail processes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdspot.com/blog/archives/24/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting Awstats to Work with Qmail</title>
		<link>http://www.bsdspot.com/blog/archives/22</link>
		<comments>http://www.bsdspot.com/blog/archives/22#comments</comments>
		<pubDate>Wed, 22 Feb 2006 01:48:37 +0000</pubDate>
		<dc:creator>BSDSpot</dc:creator>
		
		<category><![CDATA[Systems Administration]]></category>

		<category><![CDATA[FreeBSD]]></category>

		<category><![CDATA[Qmail]]></category>

		<guid isPermaLink="false">http://bsdspot.com/?p=22</guid>
		<description><![CDATA[To get awstats to work with qmail log files I use this little script from Bob Hutchinson called qlogs4awstats.
Download the file and edit the lines below to reflect your local paths. Most likely only the third line below
will need to be edited, to reflect where you have installed awstats.
chdir(&#8221;/var/log/qmail/qmail-send&#8221;);
my $taiprog = &#8220;/usr/local/bin/tai64nlocal&#8221;;
my $mailconvprog = &#8220;/usr/local/www/awstats/tools/maillogconvert.pl [...]]]></description>
			<content:encoded><![CDATA[<p>To get <a href="http://awstats.sourceforge.net/">awstats</a> to work with <a href="http://www.qmail.org/">qmail</a> log files I use this little script from Bob Hutchinson called <a href="http://midwales.com/downloads/pub/lin/various/qlogs4awstats">qlogs4awstats</a>.</p>
<p>Download the file and edit the lines below to reflect your local paths. Most likely only the third line below<br />
will need to be edited, to reflect where you have installed awstats.</p>
<blockquote><p>chdir(&#8221;/var/log/qmail/qmail-send&#8221;);</p>
<p>my $taiprog = &#8220;/usr/local/bin/tai64nlocal&#8221;;</p>
<p>my $mailconvprog = &#8220;/usr/local/www/awstats/tools/maillogconvert.pl standard&#8221;;</p></blockquote>
<p>Once edited move it to <code>/usr/local/bin</code> and <code>chmod</code> it so that it is executable.</p>
<p>Next copy awstats.model.conf to awstats.mail.conf or whatever you want to call your conf file.<br />
You will have to edit your awstats.mail.conf in the following places. Note that in the first line there is a space after the pipe character <code>|</code> .</p>
<blockquote><p>
<code></p>
<p>LogFile="/usr/local/bin/qlogs4awstats 3600 | "</p>
<p>LogType=M</p>
<p>LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd"</p>
<p>HostAliases="localhost 127.0.0.1 @locals"</p>
<p>LevelForBrowsersDetection=0         # 0 disables Browsers detection.</p>
<p>LevelForOSDetection=0               # 0 disables OS detection.</p>
<p>LevelForRefererAnalyze=0            # 0 disables Origin detection.</p>
<p>LevelForRobotsDetection=0           # 0 disables Robots detection.</p>
<p>LevelForSearchEnginesDetection=0    # 0 disables Search engines detection.</p>
<p>LevelForKeywordsDetection=0         # 0 disables Keyphrases/Keywords detection.</p>
<p>LevelForFileTypesDetection=0        # 0 disables File types detection.</p>
<p>ShowSummary=HB</p>
<p>ShowMonthStats=HB</p>
<p>ShowDaysOfMonthStats=HB</p>
<p>ShowDaysOfWeekStats=HB</p>
<p>ShowHoursStats=HB</p>
<p>ShowDomainsStats=0</p>
<p>ShowHostsStats=HBL</p>
<p>ShowRobotsStats=0</p>
<p>ShowEMailSenders=HBML</p>
<p>ShowEMailReceivers=HBML</p>
<p>ShowSessionsStats=0</p>
<p>ShowPagesStats=0</p>
<p>ShowFileTypesStats=0</p>
<p>ShowOSStats=0</p>
<p>ShowBrowsersStats=0</p>
<p>ShowOriginStats=0</p>
<p>ShowKeyphrasesStats=0</p>
<p>ShowKeywordsStats=0</p>
<p>ShowMiscStats=0</p>
<p>ShowHTTPErrorsStats=0</p>
<p>ShowSMTPErrorsStats=1</code></p></blockquote>
<p>You can download my sample awstats.mail.conf with the above changes from <a href="http://www.bsdspot.com/download/awstats.mail.sample.conf"> here </a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdspot.com/blog/archives/22/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Portaudit</title>
		<link>http://www.bsdspot.com/blog/archives/17</link>
		<comments>http://www.bsdspot.com/blog/archives/17#comments</comments>
		<pubDate>Fri, 13 Jan 2006 01:07:19 +0000</pubDate>
		<dc:creator>BSDSpot</dc:creator>
		
		<category><![CDATA[Systems Administration]]></category>

		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://bsdspot.com/?p=17</guid>
		<description><![CDATA[When installing ports from the ports tree, I was intrigued by this message for a long time:

root@t2# make
===>  Vulnerability check disabled, database not found

I never really had time to check out what the vulnerability check was and what the database it refered to was. Some time later, in an unrelated context I came across [...]]]></description>
			<content:encoded><![CDATA[<p>When installing ports from the ports tree, I was intrigued by this message for a long time:</p>
<blockquote><p>
root@t2# make<br />
===>  Vulnerability check disabled, database not found
</p></blockquote>
<p>I never really had time to check out what the vulnerability check was and what the database it refered to was. Some time later, in an unrelated context I came across portaudit under /usr/ports/security/portaudit</p>
<p>The package description reads</p>
<blockquote><p>
portaudit provides a system to check if installed ports are listed in a<br />
database of published security vulnerabilities.</p>
<p>After installation it will update this security database automatically and<br />
include its reports in the output of the daily security run.</p>
<p>&#8230;</p>
</blockquote>
<p>This sounded like a good idea, I especially liked the idea of getting the vulnerabilities reported along with the daily output run.<br />
Once installed the message about the vulnerability check being disabled goes away, which makes sense.</p>
<p> Installation from ports </p>
<blockquote><p>
root@t2# cd /usr/ports/security/portaudit<br />
root@t2# make install<br />
===>  Installing for portaudit-0.5.10<br />
===>   Generating temporary packing list<br />
===>  Checking if security/portaudit already installed</p>
<p>===>  To check your installed ports for known vulnerabilities now, do:</p>
<p>      /usr/local/sbin/portaudit -Fda</p>
<p>===>   Compressing manual pages for portaudit-0.5.10<br />
===>   Registering installation for portaudit-0.5.10
</p></blockquote>
<p>Interestingly and usefully,  if you try to make a port that is vulnerable,  portaudit complains loudly and won&#8217;t let you build it. It suggests you cvsup the ports tree and get the latest patched version of what you are trying to install. </p>
<p>Here&#8217;s a sample of a mailout from one of the machine:</p>
<blockquote><p>
Checking for a current audit database:</p>
<p>Downloading fresh database.</p>
<p>32063 bytes transferred in 0.0 seconds (712.35 kBps)<br />
New database installed.<br />
Database created: Thu Nov 24 02:40:19 CST 2005</p>
<p>Checking for packages with security vulnerabilities:</p>
<p>Affected package: squid-2.5.11_2<br />
Type of problem: squid &#8212; FTP server response handling denial of service.<br />
Reference:  &lt;http ://www.FreeBSD.org/ports/portaudit/1c3142a3-4ab2-11da-932d-00055d790c25.html&gt;</p>
<p>Affected package: lynx-2.8.5<br />
Type of problem: lynx &#8212; remote buffer overflow.<br />
Reference:  &lt;http ://www.FreeBSD.org/ports/portaudit/c01170bf-4990-11da-a1b8-000854d03344.html&gt;</p>
<p>Affected package: ruby-1.8.2_4<br />
Type of problem: ruby &#8212; vulnerability in the safe level settings.<br />
Reference:  &lt;http ://www.FreeBSD.org/ports/portaudit/1daea60a-4719-11da-b5c6-0004614cc33d.html&gt;</p>
<p>Affected package: openssl-0.9.8_1<br />
Type of problem: openssl &#8212; potential SSL 2.0 rollback.<br />
Reference:  &lt;http ://www.FreeBSD.org/ports/portaudit/60e26a40-3b25-11da-9484-00123ffe8333.html&gt;
 </p></blockquote>
<p>As you can see, portaudit advises of vulnerabilities in your installed software on a daily basis, allowing you to patch things in a timely manner.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdspot.com/blog/archives/17/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rootkit Hunter</title>
		<link>http://www.bsdspot.com/blog/archives/19</link>
		<comments>http://www.bsdspot.com/blog/archives/19#comments</comments>
		<pubDate>Wed, 11 Jan 2006 14:11:36 +0000</pubDate>
		<dc:creator>BSDSpot</dc:creator>
		
		<category><![CDATA[Systems Administration]]></category>

		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://bsdspot.com/?p=19</guid>
		<description><![CDATA[Part of my daily security routine is to check machine logs for signs of suspicious activity. Recently I found a few shell commands showing up in the Apache error log of one of the machines. It took a long time to track down the problem. In the end I found it was due to a [...]]]></description>
			<content:encoded><![CDATA[<p>Part of my daily security routine is to check machine logs for signs of suspicious activity. Recently I found a few shell commands showing up in the Apache error log of one of the machines. It took a long time to track down the problem. In the end I found it was due to a poorly written and insecure script. This script was on the server when I inherited it from the previous administrator (figuring out which script was causing the problems is a story in itself).</p>
<p>After securing the script I couldn&#8217;t help but worry that something might have been dropped onto the server. In fact, after looking around I found a few files in /tmp and a couple in some places where apache had write access. I decided to look around for a tool to help me figure out if anything important had been tampered with. A quick look through the ports turned up <strong>rkhunter</strong> under <code>/usr/ports/security/rkhunter</code>. </p>
<p>The package description reads:</p>
<blockquote><p>Rootkit Hunter is scanning tool to ensure you for about 99.9% you&#8217;re clean of nasty tools.</p>
<p>This tool scans for rootkits, backdoors and local exploits by running tests like:</p>
<p>- MD5/SHA1 hash compare<br />
- Look for default files used by rootkits<br />
- Wrong file permissions for binaries<br />
- Look for suspected strings in LKM and KLD modules<br />
- Look for hidden files<br />
- Optional scan within plaintext and binary files</p>
<p>WWW: http://www.rootkit.nl/</p></blockquote>
<p>Installing from ports is easy:<br />
<code>cd /usr/ports/security/rkhunter</code><br />
 followed by<br />
<code>make install &#038;&#038; make clean</code><br />
 and rkhunter is installed (you may also wish to install portaudit<sup>1</sup>).<br />
 The post-install blurb suggests a typing rkhunter as a first step. This gives rkhunter&#8217;s command line options.</p>
<p> The &#8211;update option updates rkhunter&#8217;s databases and is a good first step. </p>
<p><code>rkhunter --update</code></p>
<blockquote><p>root@t2# rkhunter &#8211;update<br />
Running updater&#8230;</p>
<p>Mirrorfile /usr/local/lib/rkhunter/db/mirrors.dat rotated<br />
Using mirror http://www.rootkit.nl/rkhunter<br />
[DB] Mirror file                      : Up to date<br />
[DB] MD5 hashes system binaries       : Update available<br />
  Action: Database updated (current version: 2005051900, new version 2005121400)<br />
[DB] Operating System information     : Update available<br />
  Action: Database updated (current version: 2005052200, new version 2005102800)<br />
[DB] MD5 blacklisted tools/binaries   : Up to date<br />
[DB] Known good program versions      : Update available<br />
  Action: Database updated (current version: 2005041700, new version 2005111500)<br />
[DB] Known bad program versions       : Update available<br />
  Action: Database updated (current version: 2005041700, new version 2005111500)</p>
<p>Ready.</p></blockquote>
<p>Now that the database is up to date it is time to run rkhunter in check mode (&#8211;checkall or -c)<br />
<code>rkhunter -c</code></p>
<p>Here is a sample of the output:</p>
<pre>root@t2# rkhunter -c

Rootkit Hunter 1.2.7 is running

Determining OS... Ready

Checking binaries
* Selftests
     Strings (command)                                        [ OK ]

* System tools
  Performing 'known good' check...
   /bin/cat                                                   [ OK ]
   /bin/chmod                                                 [ OK ]
   /bin/kill                                                  [ OK ]
   /bin/ls                                                    [ OK ]
   ...

Check rootkits
* Default files and directories
   Rootkit '55808 Trojan - Variant A'...                      [ OK ]
   ADM Worm...                                                [ OK ]
   Rootkit 'AjaKit'...                                        [ OK ]
   Rootkit 'aPa Kit'...                                       [ OK ]
   Rootkit 'Apache Worm'...                                   [ OK ]
   ...

* Suspicious files and malware
   Scanning for known rootkit strings                         [ OK ]
   Scanning for known rootkit files                           [ OK ]
   ...
</pre>
<p>It does seem to do a fairly thorough job in checking for a lot of things. It can be run as a cron job (the &#8211;cronjob switch takes out the colorized output). </p>
<blockquote><p>Note: RK Hunter copies <code>/etc/group</code> and <code>/etc/passwd</code> to root&#8217;s home directory. So don&#8217;t have a coronary if you spot them in there (I nearly did).</p></blockquote>
<p><a href="http://www.rootkit.nl/"><img src="http://bsdspot.com/wp-content/rklogo.gif" alt="RK Hunter" /></a></p>
<p>[1] Portaudit is used by rkhunter to check for vulnerable applications, it is useful but not actually necessary to have it installed. It can be found under <code>/usr/ports/security/portaudit</code>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdspot.com/blog/archives/19/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Welcome to BSDSpot</title>
		<link>http://www.bsdspot.com/blog/archives/7</link>
		<comments>http://www.bsdspot.com/blog/archives/7#comments</comments>
		<pubDate>Mon, 31 Oct 2005 11:16:37 +0000</pubDate>
		<dc:creator>BSDSpot</dc:creator>
		
		<category><![CDATA[Front]]></category>

		<guid isPermaLink="false">http://bsdspot.com/?p=7</guid>
		<description><![CDATA[Welcome to BSDSpot. We specialise in FreeBSD systems administration. If you&#8217;re looking for long term systems administration or one off systems adminstration you&#8217;ve come to the right place.
BSDSpot has been doing systems administration for a number of private clients for the past 3 years. During this time we have configured base systems from scratch, installing [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to BSDSpot. We specialise in FreeBSD systems administration. If you&#8217;re looking for long term systems administration or one off systems adminstration you&#8217;ve come to the right place.</p>
<p>BSDSpot has been doing systems administration for a number of private clients for the past 3 years. During this time we have configured base systems from scratch, installing software like Apache, MySQL, Postgres, PHP, Webmin, Rsync, ProFTPd, AWStats just to name a few.</p>
<p>We are very experinced in doing Qmail installs, including spamassassin and clam-av mail filtering. A standard Qmail install also includes qmailadmin and vqadmin, so that you can manage your email accounts yourself.  </p>
<p>Software can be installed via ports, packages or installed from source for maximum flexibility. </p>
<table>
<tr>
<td>
<a href="http://www.ifreelance.com/provider/detail.aspx?providerid=4594"><img src="http://www.ifreelance.com/graphics/banners/234x60/logo-green.gif?v=5" style="border-style:none" title="Hire me for freelance work at iFreelance.com. Hire me for freelance website architecture and administration jobs" alt="Hire me for freelance work at iFreelance.com. Hire me for freelance website architecture and administration jobs"/></a>
</td>
<td>
<a href="http://www.rootkit.nl/"><img src="http://bsdspot.com/wp-content/rklogo.gif" alt="RK Hunter" /></a>
</td>
<td>
<a href="http://www.hostip.info"><img src='/wp-content/button86x18.gif' alt='hosip.info' /></a>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdspot.com/blog/archives/7/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
