<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-22954568</id><updated>2012-01-01T06:09:00.434Z</updated><title type='text'>Pat Gardner</title><subtitle type='html'>Linux, Unix, Software.....
Things I've done recorded here so I don't forget.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-22954568.post-79493449826666292</id><published>2008-07-16T11:50:00.004+01:00</published><updated>2008-07-16T15:32:56.923+01:00</updated><title type='text'>Solaris 10 ipfilter</title><content type='html'>Quick guide for ipfilter on Solaris 10&lt;br /&gt;&lt;br /&gt;IP Filter home page:&lt;br /&gt;&lt;a href="http://coombs.anu.edu.au/~avalon/"&gt;http://coombs.anu.edu.au/~avalon/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Documentation for IPF is also available from:&lt;br /&gt;&lt;a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-ipf.html"&gt;http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-ipf.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enable interfaces to be used with packet filtering:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Edit /etc/pfil/pfil.ap (old way...now seems to require editing /etc/iu.ap)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Uncomment the device names to enable or add a line to specify the interface:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;hme0  -1      0       pfil&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For the changes to take effect:&lt;br /&gt;&lt;br /&gt;1. svcadm restart /network/pfil and replumb the interfaces&lt;br /&gt;or&lt;br /&gt;2. Reboot&lt;br /&gt;&lt;br /&gt;Set the ipfilter service to enabled:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;svcadm enable network/ipfilter and replumb the interfaces or reboot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;By default the configuration files in /etc/ipf will be read at startup&lt;br /&gt;&lt;br /&gt;ipf.conf - ipv4 filtering rules&lt;br /&gt;ipf6.conf - ipv6 filtering rules (if ipv6 is configured)&lt;br /&gt;ipnat.conf - NAT rules (optional)&lt;br /&gt;ippool.conf - refer to many address by a single group name (optional)&lt;br /&gt;&lt;br /&gt;A simple ipf.conf to block and log all traffic other than ssh would contain:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;pass out quick all keep state&lt;br /&gt;pass in quick on hme0 proto tcp from any to any port = 22 keep state&lt;br /&gt;block in log all &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Filtering rules can be loaded from alternative locations:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ipf -f filename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As can NAT rules:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ipnat -f filename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Filter rules sets can either be active or inactive. Doesn't seem to support adding or removing individual rules so the only way of changing the current set seems to be to load an inactive set and to swap that with the running set.&lt;br /&gt;&lt;br /&gt;To switch between the active and inactive rule sets:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ipf -s&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To modify packet filtering behaviour:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ipf -Fa (remove both incoming and outgoing rule sets)&lt;br /&gt;&lt;br /&gt;ipf -Fo (remove outgoing rules only)&lt;br /&gt;&lt;br /&gt;ipf -Fi (remove incoming rules only)&lt;br /&gt;&lt;br /&gt;ipf -D (disable all packet filtering)&lt;br /&gt;&lt;br /&gt;ipf -E (enable packet filtering)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To view currently loaded rules for the active set:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ipfstat -io&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To view currently loaded rules for the inactive set:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;ipfstat -I -io&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To remove all the runnings rules and load a new set from a file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ipf -Fa -f filename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To load rules to the inactive rule set:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ifp -I -f filename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To append rules to the current active rule set:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;echo "block in log on hme0 proto tcp from any to any port = 25" | ipf -f -&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sample rule set for an Solaris 10 host (192.168.93.128) with one zone (192.168.93.132). The interface name is hme0. We all ssh and icmp echo (ping) only to the host, all else being blocked. All outgoing traffic is allowed and stateful. http is allowed through to the Solaris zone hosted on the server:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;pass out quick all keep state&lt;br /&gt;pass in quick on hme0 proto icmp from any to any icmp-type 8 keep state &lt;br /&gt;pass in quick on hme0 proto tcp from any to 192.168.93.128 port = ssh keep state&lt;br /&gt;pass in quick on hme0 proto udp from any to 192.168.93.132/32 port = 80 keep state&lt;br /&gt;block in log all&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-79493449826666292?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/79493449826666292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=79493449826666292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/79493449826666292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/79493449826666292'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2008/07/solaris-10-ipfilter.html' title='Solaris 10 ipfilter'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-7218489834978225219</id><published>2008-07-16T11:50:00.001+01:00</published><updated>2008-07-16T11:53:23.454+01:00</updated><title type='text'>PaTcH_MsG 8 Version of is not installed on this system</title><content type='html'>I had to manually run some of the patches in the Solaris patch cluster recently but got this error:&lt;br /&gt;&lt;br /&gt;&gt; ./checkinstall: .: filename argument required &lt;br /&gt;&gt; .: usage: . filename &lt;br /&gt;&gt; PaTcH_MsG 8 Version of is not installed on this system.&lt;br /&gt;&lt;br /&gt;To fix make sure that the directory tree all the way down to the patch is executable by 'nobody'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-7218489834978225219?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/7218489834978225219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=7218489834978225219' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/7218489834978225219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/7218489834978225219'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2008/07/patchmsg-8-version-of-is-not-installed.html' title='PaTcH_MsG 8 Version of is not installed on this system'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-542291483525043817</id><published>2007-03-01T16:08:00.000Z</published><updated>2007-03-01T16:23:41.151Z</updated><title type='text'>setuid wrapper</title><content type='html'>&lt;div align="left"&gt;I needed to run a script with root privileges,but had&lt;br /&gt; forgotten that Solaris (and I guess mosts versions of Unix) will not allow setuid on scripts. The solutions is to write a binary wrapper will will call the script:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;strong&gt;#include        &amp;lt;unistd.h&amp;gt;&lt;br /&gt;#include        &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#define myfile  "/path/to/script"&lt;br /&gt;&lt;br /&gt;main(argc, argv)&lt;br /&gt;char **argv;&lt;br /&gt;{&lt;br /&gt;       setuid(0);&lt;br /&gt;       seteuid(0);&lt;br /&gt;       execv(myfile, argv);&lt;br /&gt;}&lt;/strong&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-542291483525043817?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/542291483525043817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=542291483525043817' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/542291483525043817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/542291483525043817'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2007/03/setuid-wrapper.html' title='setuid wrapper'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-2385130426408939988</id><published>2007-01-17T22:18:00.000Z</published><updated>2007-01-17T22:30:40.285Z</updated><title type='text'>Fix for acroread</title><content type='html'>&lt;div align="justify"&gt;&lt;div align="justify"&gt;Adobe reader fails to start on the Gnome desktop on Fedora 6. There &lt;br /&gt;seems to be a conflict withscim (smart common input method). &lt;br /&gt;The fix is to add the following to the top of /usr/bin/acroread:&lt;br /&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;strong&gt;&lt;i&gt;export GTK_IM_MODULE=xim&lt;/i&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-2385130426408939988?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/2385130426408939988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=2385130426408939988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/2385130426408939988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/2385130426408939988'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2007/01/fix-for-acroread.html' title='Fix for acroread'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-116527312984310936</id><published>2006-12-04T22:48:00.000Z</published><updated>2006-12-04T22:58:49.856Z</updated><title type='text'>GRUB errors</title><content type='html'>After a migration of my home server to a new mirrored 500GB sata setup from my old 160GB pata system, I encountered some problems with booting the server. Intially booting stopped at:&lt;br /&gt;&lt;br /&gt;GRUB _&lt;br /&gt;&lt;br /&gt;This was fixed by booting from the FC6 DVD and selecting "linux rescue". I then chrooted to my install with "chroot /mnt/sysimage", followed by a "grub-install".&lt;br /&gt;&lt;br /&gt;This fixed my first problem but now boot was hanging at:&lt;br /&gt;&lt;br /&gt;GRUB loading stage 2&lt;br /&gt;&lt;br /&gt;So again, back into the rescue boot and my chroot environment. Now I ran "/sbin/grub" which took me into the grub shell. I ran "root (hd0,0)" to use the first partition of the boot disk, then ran "setup (hd0).&lt;br /&gt;&lt;br /&gt;Next boot all was well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-116527312984310936?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/116527312984310936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=116527312984310936' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/116527312984310936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/116527312984310936'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/12/grub-errors.html' title='GRUB errors'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-116501027889766985</id><published>2006-12-01T21:52:00.000Z</published><updated>2006-12-01T21:59:18.876Z</updated><title type='text'>X Forwarding problems</title><content type='html'>I've set up a new Fedora 6 server using Xen (another story), but no xorg packages were installed. When logging in over ssh with X forwarding enabled (ssh -X) I still couldn't run any GUI applications remotely. Logging in with debug (ssh -Xv):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;debug1: Requesting X11 forwarding with authentication spoofing.&lt;br /&gt;debug1: Remote: No xauth program; cannot forward with spoofing.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Turns out the solution is to install xauth: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;# yum install xorg-x11-xauth.i386&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-116501027889766985?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/116501027889766985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=116501027889766985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/116501027889766985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/116501027889766985'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/12/x-forwarding-problems.html' title='X Forwarding problems'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115772891980494184</id><published>2006-09-08T16:01:00.000+01:00</published><updated>2006-09-08T16:21:59.876+01:00</updated><title type='text'>Configuring apache for webdav</title><content type='html'>I wanted to configure my apache server with a webdav directory to test iCal's calender publishing ability. My apache server runs on Fedora Core 5. In /etc/httpd/conf.d I created a file called webdav.conf which along with all the other .conf files in this directory gets read by the master conf file /etc/httpd/conf/httpd.conf. The file webdav.conf has the following content:&lt;br /&gt;&lt;br /&gt;&amp;lt;Location /cal&amp;gt;&lt;br /&gt;DAV On&lt;br /&gt;AuthType Basic&lt;br /&gt;AuthName "WebDAV Restricted"&lt;br /&gt;AuthUserFile /var/www/.htusers&lt;br /&gt;require user myuser&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;br /&gt;&lt;br /&gt;The location directive refers to a directory called "cal" located at the root of my webserver created with:&lt;br /&gt;&lt;br /&gt;mkdir -p /var/www/html/cal&lt;br /&gt;chown apache:apache /var/www/html/cal&lt;br /&gt;&lt;br /&gt;"DAV On" enables the webdav access for this location. I'm using basic apache username/password authentication for a pre-existing user "myuser" in the file /var/www/.htusers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115772891980494184?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115772891980494184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115772891980494184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115772891980494184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115772891980494184'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/09/configuring-apache-for-webdav.html' title='Configuring apache for webdav'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115677269813401520</id><published>2006-08-28T11:43:00.000+01:00</published><updated>2006-08-28T16:05:38.386+01:00</updated><title type='text'>Secure IMAP with Dovecot and SSL</title><content type='html'>In common with many other older protocols IMAP traffic is sent in clear text, with potential for anyone to eavesdrop or steal passwords. Like other modern IMAP servers Dovecot provides methods of enhancing security; you can either use secure authentication methods such as cram-md5 or encrypt the whole session using SSL. I've configured my Fedora Core 5 server to use SSL.&lt;br /&gt;&lt;br /&gt;By default on FC5 Dovecot allows the following protocols:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;imap imaps pop3 pop3s &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To only allow imaps we must set:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;protocols = imaps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;in /etc/dovecot.conf&lt;br /&gt;&lt;br /&gt;The server also comes with a dummy "localhost.localdomain" x509 certificate in /etc/pki/dovecot which should be replaced by at your own self-certified certificate (or even better one signed by a CA). There is a script provided ( /usr/share/doc/dovecot-1.0/examples/mkcert.sh ) to automate the process, but first a two files must be modified. Since mkcert.sh has not been written specifically for FC5 we must change the locations in the script so that they look like:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;# Generates a self-signed certificate.&lt;br /&gt;# Edit dovecot-openssl.cnf before running this.&lt;br /&gt;&lt;br /&gt;OPENSSL=${OPENSSL-openssl}&lt;br /&gt;#SSLDIR=${SSLDIR-/etc/ssl}&lt;br /&gt;SSLDIR=${SSLDIR-/etc/pki/dovecot}&lt;br /&gt;OPENSSLCONFIG=${OPENSSLCONFIG-/etc/pki/dovecot/dovecot-openssl.cnf}&lt;br /&gt;&lt;br /&gt;CERTFILE=$SSLDIR/certs/dovecot.pem&lt;br /&gt;KEYFILE=$SSLDIR/private/dovecot.pem&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Of course, these values should match what is in /etc/dovecot.conf, but the above is good for a default install. Next, update the contents of /etc/pki/dovecot/dovecot-openssl.cnf to reflect the local country code, organisation and common name (something other than localhost.localdomain!). Now all that is reuired is to run "mkcert.sh" then run a "service dovecot restart", following which any mail clients will need to be configured for SSL.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115677269813401520?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115677269813401520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115677269813401520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115677269813401520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115677269813401520'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/08/secure-imap-with-dovecot-and-ssl.html' title='Secure IMAP with Dovecot and SSL'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115532886286626131</id><published>2006-08-11T21:20:00.000+01:00</published><updated>2006-08-11T21:44:12.073+01:00</updated><title type='text'>CUPS Browsing</title><content type='html'>The CUPS print software ships with the browse support (or rather the broadcast component of the server) disabled. Once enabled, all clients should be able to detect and browse all printers on the server. There are basically three possible configurations (in /etc/cups/cupsd.conf) for broadcast:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;BrowseAddress aaa.bbb.ccc.ddd&lt;br /&gt;BrowseAddress @LOCAL&lt;br /&gt;BrowseAddress @IF(name)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The first will specify a broadcast address such as 192.168.0.255. The second will broadcast to all local nets, whilst ignoring LANS such as point-to-point (dial-up) etc. The last limits broadcasts to an interface, so "BrowseAddress @IF(eth0)" only broadcasts on device eth0.&lt;br /&gt;&lt;br /&gt;By default the server will allow incoming packets from any address, so if you wish to restrict access you can use either of the "BrowseAllow" or "BrowseDeny" directives as in:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;BrowseDeny badhost.example.net (requires "HostNameLookups On")&lt;br /&gt;BrowseDeny 192.168.1.10&lt;br /&gt;BrowseDeny @IF(eth1)&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115532886286626131?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115532886286626131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115532886286626131' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115532886286626131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115532886286626131'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/08/cups-browsing.html' title='CUPS Browsing'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115471870810975000</id><published>2006-08-04T20:07:00.000+01:00</published><updated>2006-08-04T20:11:48.120+01:00</updated><title type='text'>Solaris and man page troubles</title><content type='html'>After a fresh install of Solaris I was unable to use "man -k" as I was getting:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;/usr/share/man/windex: No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The solution is to run "catman -w" and all is well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115471870810975000?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115471870810975000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115471870810975000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115471870810975000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115471870810975000'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/08/solaris-and-man-page-troubles.html' title='Solaris and man page troubles'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115210807307493212</id><published>2006-07-05T14:44:00.000+01:00</published><updated>2006-07-05T21:53:11.803+01:00</updated><title type='text'>Xgl on Fedora Core 5</title><content type='html'>I've got &lt;a href="http://en.wikipedia.org/wiki/Xgl"&gt;Xgl&lt;/a&gt; running by following the instructions &lt;a href="http://forums.fedoraforum.org/showthread.php?t=111771"&gt;here&lt;/a&gt;. I've been waiting quite a while for somebody to provide an easy and non destructive way of installing Xgl. I have previously tried using Aiglx, but that didn't seem as stable; blurry fonts and X server hangs when switching between virtual consoles.&lt;br /&gt;&lt;br /&gt;Xgl works very well on my desktop (P4 2.8, 1 GB Ram, nVidia fx5700 256MB) with the nVidia driver, but not so well on my laptop (P4 2.4, 1 GB Ram, ATI 340M IGP). As ATI haven't released a linux driver for the 320/340 IGP series I have to use the open source 'radeon' driver which doesn't yet support the pixel-buffer required by Xgl. As a result some of the effects are rendered in software, and some graphical glitches are visible.&lt;br /&gt;&lt;br /&gt;To view/modify the shortcut keys for compiz (which provides all the cool effects) you'll need to run 'gconf-editor' and look at 'apps/compiz'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115210807307493212?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115210807307493212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115210807307493212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115210807307493212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115210807307493212'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/07/xgl-on-fedora-core-5.html' title='Xgl on Fedora Core 5'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115153593351321084</id><published>2006-06-28T23:34:00.000+01:00</published><updated>2006-06-29T00:05:33.570+01:00</updated><title type='text'>Remote name daemon control (rndc) for BIND</title><content type='html'>Using the rndc command you can send commands to your DNS servers over TCP authenticated by digital signatures. Without any parameters the command prints out its options:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Usage: rndc [-c config] [-s server] [-p port]&lt;br /&gt;        [-k key-file ] [-y key] [-V] command&lt;br /&gt;&lt;br /&gt;command is one of the following:&lt;br /&gt;&lt;br /&gt;  reload        Reload configuration file and zones.&lt;br /&gt;  reload zone [class [view]]&lt;br /&gt;                Reload a single zone.&lt;br /&gt;  refresh zone [class [view]]&lt;br /&gt;                Schedule immediate maintenance for a zone.&lt;br /&gt;  retransfer zone [class [view]]&lt;br /&gt;                Retransfer a single zone without checking serial number.&lt;br /&gt;  freeze zone [class [view]]&lt;br /&gt;                Suspend updates to a dynamic zone.&lt;br /&gt;  thaw zone [class [view]]&lt;br /&gt;                Enable updates to a frozen dynamic zone and reload it.&lt;br /&gt;  reconfig      Reload configuration file and new zones only.&lt;br /&gt;  stats         Write server statistics to the statistics file.&lt;br /&gt;  querylog      Toggle query logging.&lt;br /&gt;  dumpdb [-all|-cache|-zones] [view ...]&lt;br /&gt;                Dump cache(s) to the dump file (named_dump.db).&lt;br /&gt;  stop          Save pending updates to master files and stop the server.&lt;br /&gt;  stop -p       Save pending updates to master files and stop the server&lt;br /&gt;                reporting process id.&lt;br /&gt;  halt          Stop the server without saving pending updates.&lt;br /&gt;  halt -p       Stop the server without saving pending updates reporting&lt;br /&gt;                process id.&lt;br /&gt;  trace         Increment debugging level by one.&lt;br /&gt;  trace level   Change the debugging level.&lt;br /&gt;  notrace       Set debugging level to 0.&lt;br /&gt;  flush         Flushes all of the server's caches.&lt;br /&gt;  flush [view]  Flushes the server's cache for a view.&lt;br /&gt;  flushname name [view]&lt;br /&gt;                Flush the given name from the server's cache(s)&lt;br /&gt;  status        Display status of the server.&lt;br /&gt;  recursing     Dump the queries that are currently recursing (named.recursing)&lt;br /&gt;  *restart      Restart the server.&lt;br /&gt;&lt;br /&gt;* == not yet implemented&lt;br /&gt;Version: 9.3.2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Because digital signatures are used for authentication with the name server daemon, you must speicify either a key-file ( -k option) or key on the command line ( -y option). If no key or key-file is sepcified then rndc will look in the rndc.conf file.&lt;br /&gt;&lt;br /&gt;So now you can do cool stuff like turn query logging on and off with:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;# rndc querylog&lt;br /&gt;# ping -c 1 www.google.com&lt;br /&gt;# tail /var/log/messages&lt;br /&gt;Jun 28 23:48:21 poseidon named[1986]: query logging is now on&lt;br /&gt;Jun 28 23:48:48 poseidon named[1986]: client 192.168.116.10#33362: query: www.google.com IN A +&lt;br /&gt;# rndc querylog&lt;br /&gt;# tail /var/log/messages&lt;br /&gt;Jun 28 23:51:32 poseidon named[1986]: query logging is now off&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can dump the name server cache with the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;# rndc dumpdb -cache&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The dump file will be specified in the named.conf file in the options directive:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;dump-file "/var/named/data/cache_dump.db";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since my server runs in a chrooted environment the location is actually /var/named/chroot/var/damed/data/cache_dump.db. The file itself is just plain text so you can view it in any editor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115153593351321084?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115153593351321084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115153593351321084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115153593351321084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115153593351321084'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/06/remote-name-daemon-control-rndc-for.html' title='Remote name daemon control (rndc) for BIND'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115144386491502469</id><published>2006-06-27T22:13:00.000+01:00</published><updated>2006-06-27T22:31:04.933+01:00</updated><title type='text'>DB2 upgrade</title><content type='html'>I had a DB2 V8.1 fixpack 2 installation on one of my FC5 systems which I upgraded to the (currently) latest fixpack 12. After completing the upgrade and running the post install tasks (iupdate) I found I couldn't run any of the utils such as db2cc:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;[db2inst1@medusa ~]$ db2cc&lt;br /&gt;        stackpointer=0x1c3aa4&lt;br /&gt;Writing Java core file ....&lt;br /&gt;Written Java core to /tmp/javacore11599.1151439455.txt&lt;br /&gt;DB2JAVIT : RC = 11&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oops! Something was clearly very wrong here. It turns out that the Java SDK (1.31) originally installed with DB2 doesn't work with FC5 or my kernel (2.6.17). My problem was resolved by downloading and installing the Java 1.42 SDK rpm from IBM, and running the following command as user db2inst1:&lt;br /&gt; &lt;br /&gt;&lt;span style="font-style:italic;"&gt;db2 update dbm cfg using JDK_PATH /opt/IBMJava2-142&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115144386491502469?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115144386491502469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115144386491502469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115144386491502469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115144386491502469'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/06/db2-upgrade.html' title='DB2 upgrade'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115118859918805656</id><published>2006-06-24T23:07:00.000+01:00</published><updated>2006-06-24T23:36:39.240+01:00</updated><title type='text'>Mirroring websites with wget</title><content type='html'>I'm sure it's already quite well known, but I've just discovered how to mirror web sites with wget. I'd been wanting to make sure I had a back up of this blog and was already sure that wget would be the tool to use. A quick search turned up this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;wget --mirror –w 2 –p --html-extension –-convert-links –P /home/pat/documents/blogger/ http://patgardner.blogspot.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;--mirror&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;get files recursively, but depending on timestamp&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;-w&lt;/span&gt;                   &lt;br /&gt;&lt;br /&gt;wait a number of seconds between retrieval&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;-p&lt;/span&gt;           &lt;br /&gt;&lt;br /&gt;download all page requisites such as images&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;--html-extension&lt;/span&gt;         &lt;br /&gt;&lt;br /&gt;makes sure that all the copies of files have .html file extensions&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;--convert-links&lt;/span&gt;     &lt;br /&gt;&lt;br /&gt;convert links suitable for local viewing&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;-P&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;path to save files to&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115118859918805656?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115118859918805656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115118859918805656' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115118859918805656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115118859918805656'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/06/mirroring-websites-with-wget.html' title='Mirroring websites with wget'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115080271480870368</id><published>2006-06-20T12:16:00.000+01:00</published><updated>2006-06-20T12:25:14.816+01:00</updated><title type='text'>iFolder</title><content type='html'>I've just discovered &lt;a href="http://www.ifolder.com"&gt;iFolder&lt;/a&gt;, a storage solution originally created by Novell but now released as an open source project. With iFolders you can set up directories to replicate to a server, which in turn will replicate to any other computer that has the client software installed. Client software is available for Windows XP, Linux and OS X. Without the client software you can still upload/download files via the web interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115080271480870368?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115080271480870368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115080271480870368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115080271480870368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115080271480870368'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/06/ifolder.html' title='iFolder'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115046144811910837</id><published>2006-06-16T13:30:00.000+01:00</published><updated>2006-06-16T13:37:28.130+01:00</updated><title type='text'>Slow Firefox</title><content type='html'>Firefox 1.5.0.3 provided with Fedora 5 seems very slow (more so on my laptop) particularly when scrolling. Cpu usage can easily hit 100% when scrolling up and down a page. A short term solution until they fix it is to put:&lt;br /&gt;&lt;br /&gt;export MOZ_DISABLE_PANGO=1&lt;br /&gt;&lt;br /&gt;In your .bash_profile.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115046144811910837?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115046144811910837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115046144811910837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115046144811910837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115046144811910837'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/06/slow-firefox.html' title='Slow Firefox'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-115045739283486457</id><published>2006-06-16T11:18:00.000+01:00</published><updated>2006-06-16T12:29:52.913+01:00</updated><title type='text'>Zeroconf service discovery</title><content type='html'>Another new addition to the latest release of Fedora is &lt;a href="http://avahi.org"&gt;avahi&lt;/a&gt; support, better known as zeroconf or &lt;a href="http://www.apple.com/macosx/features/bonjour/"&gt;bonjour&lt;/a&gt; in the Apple world. This allows for service discovery on the network, such as printers automatically anouncing their presence or bookmarks being broadcast to the LAN. The avahi-daemon takes care of advertising services whilst application such as Gnome (2.14) are avahi aware. Here is an example of how to get avahi up and running.&lt;br /&gt;&lt;br /&gt;1. Configure some services. The directory /etc/avahi/services is initially empty, so we'll create a few files:&lt;br /&gt;&lt;br /&gt;apache.service&lt;br /&gt;ssh-ftp.service&lt;br /&gt;ssh.service&lt;br /&gt;&lt;br /&gt;We populate the files with the following data:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&amp;lt;?xml version="1.0" standalone='no'?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&amp;gt;&lt;br /&gt;&amp;lt;service-group&amp;gt;&lt;br /&gt;  &amp;lt;name&amp;gt;Apache Server Documentation&amp;lt;/name&amp;gt;&lt;br /&gt;  &amp;lt;service&amp;gt;&lt;br /&gt;    &amp;lt;type&amp;gt;_http._tcp&amp;lt;/type&amp;gt;&lt;br /&gt;    &amp;lt;port&amp;gt;80&amp;lt;/port&amp;gt;&lt;br /&gt;    &amp;lt;txt-record&amp;gt;path=/manual&amp;lt;/txt-record&amp;gt;&lt;br /&gt;  &amp;lt;/service&amp;gt;&lt;br /&gt;&amp;lt;/service-group&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" standalone='no'?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&amp;gt;&lt;br /&gt;&amp;lt;service-group&amp;gt;&lt;br /&gt;  &amp;lt;name replace-wildcards="yes"&amp;gt;SFTP File Transfer on %h&amp;lt;/name&amp;gt;&lt;br /&gt;  &amp;lt;service&amp;gt;&lt;br /&gt;    &amp;lt;type&amp;gt;_sftp-ssh._tcp&amp;lt;/type&amp;gt;&lt;br /&gt;    &amp;lt;port&amp;gt;22&amp;lt;/port&amp;gt;&lt;br /&gt;  &amp;lt;/service&amp;gt;&lt;br /&gt;&amp;lt;/service-group&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" standalone='no'?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&amp;gt;&lt;br /&gt;&amp;lt;service-group&amp;gt;&lt;br /&gt;  &amp;lt;name replace-wildcards="yes"&amp;gt;Remote Terminal on %h&amp;lt;/name&amp;gt;&lt;br /&gt;  &amp;lt;service&amp;gt;&lt;br /&gt;    &amp;lt;type&amp;gt;_ssh._tcp&amp;lt;/type&amp;gt;&lt;br /&gt;    &amp;lt;port&amp;gt;22&amp;lt;/port&amp;gt;&lt;br /&gt;  &amp;lt;/service&amp;gt;&lt;br /&gt;&amp;lt;/service-group&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Enable the avahi-daemon, and have it auto start on system boot.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;# service avahi-daemon start&lt;br /&gt;# chkconfig avahi-daemon on&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3. We can also enable Gnome file sharing from "Desktop/Preferences/Personal File Sharing" which provides WebDAV access to ~/Public.&lt;br /&gt;&lt;br /&gt;4. If we now start nautilus and click on "network" or go to the "network:///" Gnome-VFS, you can see that in addition to the Windows SMB network we also have the "Public" WebDAV share as well as the secure FTP resources displayed:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Network%20-%20File%20Browser.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Network%20-%20File%20Browser.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5. Epiphany (the Gnome web browser) is the only browser which supports avahi bookmarks at this time. We can see this working if we start Epiphany:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Bookmarks.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Bookmarks.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are a couple of other tools which can display zeroconf services, the avahi provided 'avahi-discover' and the 'Zeroconf discovery applet' which is avaible from the avahi website. Download the service-discovery-applet tarball, unpack and run:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;# ./configure &amp;&amp; make &amp;&amp; make install&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You should now be able to add the applet to your gnome-panel:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/zeroconf-applet.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/zeroconf-applet.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's clearly early days for zeroconf support in Linux, but what there is works well. I hope that the Gnome team and other application developers continue to integrate and extend avahi support.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-115045739283486457?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/115045739283486457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=115045739283486457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115045739283486457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/115045739283486457'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/06/zeroconf-service-discovery.html' title='Zeroconf service discovery'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114920371296604247</id><published>2006-06-01T23:47:00.000+01:00</published><updated>2006-06-02T00:15:12.993+01:00</updated><title type='text'>Sendmail SmtpGreetingMessage</title><content type='html'>Call me old fashioned, but I still use sendmail. Yeah, I know there are lots of more modern and easy to use MTA's out there but I don't have the time to learn them right now. Sometimes best to stick with what you know. Anyhow...&lt;br /&gt;&lt;br /&gt;I was wondering how to change the greeting message on an smtp connection and a long search through my O'Reilly sendmail 3rd Edition provided the answer. The following is an mc configuration for versions 8.7 or above:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;define(`confSMTP_LOGIN_MSG',`message')&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Where "message" is a string that must at least contain the localhost name. By default message would be:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;$j Sendmail $v/$Z; $b&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;In sendmail.cf which results in something like:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;220 mailhost.mydomain.com ESMTP Sendmail 8.13.6/8.13.6; Thu, 1 Jun 2006 23:19:51 +0100&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Where:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;$j = fully qualified hostname&lt;br /&gt;$v = sendmail version&lt;br /&gt;$Z = configuration file version&lt;br /&gt;$b = current date and time&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I placed this new definition in my sendmail.mc:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;define(`confSMTP_LOGIN_MSG',`$j MTA ready and waiting ; $b')&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Which displays:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;220 mailhost.mydomain.com ESMTP MTA ready and waiting ; Fri, 2 Jun 2006 00:06:08 +0100&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Why did I do this? Well it's usually better with sendmail (or indeed any MTA or service) to hide the version from the outside world as this can make it a little harder to exploit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114920371296604247?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114920371296604247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114920371296604247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114920371296604247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114920371296604247'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/06/sendmail-smtpgreetingmessage.html' title='Sendmail SmtpGreetingMessage'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114909642441028133</id><published>2006-05-31T16:24:00.000+01:00</published><updated>2006-05-31T18:27:04.476+01:00</updated><title type='text'>Power Management</title><content type='html'>Fedora Core 5 comes with the new "gnome-power-manager" which is rather good, as it provides a few more features than the old battery applet such as suspend-to-ram (suspend) and suspend-to-disk (hibernate). However, I can't get my Compaq Presario 2104EU to suspend-to-ram properly; it suspends ok, but powering on just gives me a blank screen. I'd tried to add boot options such as 'acpi_sleep=s3_bios', but to no avail. Either it's a flaky bios or I need to remove some modules before  putting the laptop into suspend. What does work is hibernate, though I do have to run 'service network restart' upon resume as it seems to loose its network settings.&lt;br /&gt;&lt;br /&gt;For FC5 you can update the 'gnome-power-manager' to the lastest version by adding this file to /etc/yum.repos.d/ and running:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;# yum -y update gnome-power-manager.i386&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Restarting your gnome session you get this new applet:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/power-applet.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/power-applet.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Choosing "information" from the menu displays extra's that aren't on the official FC5 release:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Power%20Information.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Power%20Information.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Power%20Information-1.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Power%20Information-1.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Power%20Information-2.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Power%20Information-2.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114909642441028133?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114909642441028133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114909642441028133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114909642441028133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114909642441028133'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/05/power-management.html' title='Power Management'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114898401004270467</id><published>2006-05-30T11:05:00.000+01:00</published><updated>2006-05-30T11:13:30.050+01:00</updated><title type='text'>Loopback file systems</title><content type='html'>I had to mount a hard disk image today and found &lt;a href="http://www.mega-tokyo.com/osfaq2/index.php/Disk%20Images%20Under%20Linux"&gt;this&lt;/a&gt; excellent guide for loopback filesystems on Linux.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114898401004270467?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114898401004270467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114898401004270467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114898401004270467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114898401004270467'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/05/loopback-file-systems.html' title='Loopback file systems'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114875749170503586</id><published>2006-05-27T20:10:00.000+01:00</published><updated>2006-05-27T20:18:11.723+01:00</updated><title type='text'>Picasa for Linux</title><content type='html'>Picasa, the google photo manager, has been released for Linux. It's not a fully native port as it runs using WINE, but even so the performance doesn't seem to suffer for it and I've not noticed any missing features. Download and further information from &lt;a href="http://picasa.google.com/linux/"&gt;here&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;I'd suggest setting the 'Folder Manager' to only scan /home as by default it scans the whole file system, which makes Picasa take forever to load subsequently!&lt;br /&gt;&lt;br /&gt;For anybody that doesn't like the ugly 'winfile' when you 'Locate on Disk' in Picasa just create a script called 'picasa-hook-filemanager.sh' with the following content somewhere in your path (this only works for Gnome):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;#/bin/bash&lt;br /&gt;nautilus `dirname "$1"`&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This is from the &lt;a href="http://picasa.google.com/linux/faq.html"&gt;Picasa/Linux FAQ.&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;"You may be surprised that Picasa can't locate files on your Gnome system. Unfortunately, we weren't able to find a way to make Nautilus to open with the correct file highlighted."&lt;br /&gt;&lt;br /&gt;I couldn't get the highlight working either even though this &lt;a href="http://live.gnome.org/Nautilus"&gt;link&lt;/a&gt; suggests it may be possible on 2.14.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114875749170503586?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114875749170503586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114875749170503586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114875749170503586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114875749170503586'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/05/picasa-for-linux.html' title='Picasa for Linux'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114865657920976225</id><published>2006-05-26T16:10:00.000+01:00</published><updated>2006-05-26T16:16:19.210+01:00</updated><title type='text'>Fix that eject button!</title><content type='html'>On Linux systems there really is no need to have the cd-rom drawer locked when a disc is inside and having to run the "eject" command to open the tray. This behaviour can be easily fixed with:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;# echo "dev.cdrom.lock=0" &gt;&gt; /etc/sysctl.conf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Followed by a reboot. To have it take effect immediately:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;# sysctl -w dev.cdrom.lock=0&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114865657920976225?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114865657920976225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114865657920976225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114865657920976225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114865657920976225'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/05/fix-that-eject-button.html' title='Fix that eject button!'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114865414835349242</id><published>2006-05-26T14:33:00.000+01:00</published><updated>2006-05-26T16:24:07.396+01:00</updated><title type='text'>Nautilus Actions</title><content type='html'>As much as I like the Gnome desktop there are times when I want to perform a specific action (send a file via bluetooth for example) on a file or directory and have to use gnome-terminal because nautilus (the gnome file manager) doesn't support what I'm trying to do. Forunately I have now discovered two ways around this; the package nautilus-actions and the native nautilus scripting. I prefer the first method which allows custom right-click actions on objects in nautilus, and here is how you go about it (tested on FC5):&lt;br /&gt;&lt;br /&gt;1. Install "nautilus-actions"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;#yum -y install nautilus-actions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Launch the nautilus-actions configurer from the Gnome panel&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Desktop/Preferences/More Preferences/Nautilus Actions Configuration&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3. Nautilus-actions will start with no preconfigured actions so we must click on "Add"&lt;br /&gt;&lt;br /&gt;4. I'm using "Send files via bluetooth" as an example&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Add%20a%20New%20Action.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Add%20a%20New%20Action.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is the definition of the editable values:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;"Label"&lt;br /&gt;How this will appear on the right-click menu&lt;br /&gt;&lt;br /&gt;"Tooltip"&lt;br /&gt;An optional descriptive text that will appear at the bottom of the nautilus window&lt;br /&gt;&lt;br /&gt;"Icon"&lt;br /&gt;Optional icon to precede the label&lt;br /&gt;&lt;br /&gt;"Path"&lt;br /&gt;The executable or script that we wish to perform the action (full path is only necessary if the executable is outside of your normal path ie /sbin )&lt;br /&gt;&lt;br /&gt;"Paramters"&lt;br /&gt;Paramters passed to the executable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-nautilus-actions-config.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-nautilus-actions-config.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm using "%M" which will pass the full name and path of the files selected to the executable, in this case "gnome-obex-send".&lt;br /&gt;&lt;br /&gt;5. Configure the conditions and advance conditions. These allow you to set the actions behaviour so that it will only work on certain file types, or if the action applies to local or remote (network) file systems.&lt;br /&gt;&lt;br /&gt;6. Click ok to save then close the application.&lt;br /&gt;&lt;br /&gt;7. Test by opening a naultilus window, selecting a file and right clicking:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/screen.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/screen.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We have a new nautilus action!&lt;br /&gt;&lt;br /&gt;I also tried to add an action to send files via thunderbird (I don't like evolution much) by using this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;thunderbird -compose  "attachment='file:///%M'"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It seems that Thunderbird 1.5 is broken at this time and doesn't process its command line arguments properly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114865414835349242?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114865414835349242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114865414835349242' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114865414835349242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114865414835349242'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/05/nautilus-actions.html' title='Nautilus Actions'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114858127989667235</id><published>2006-05-25T18:19:00.000+01:00</published><updated>2006-05-26T13:42:16.113+01:00</updated><title type='text'>Ext3 and full data journaling</title><content type='html'>Ext3 is a stable and mature file system, offering a good balance of speed and reliability. But what many people do not realise is that the default journaling support is only for meta-data, not all data. Here is the relevant section from 'man tune2fs':&lt;br /&gt;&lt;br /&gt;                &lt;span style="font-style:italic;"&gt;journal_data&lt;br /&gt;                       When  the  filesystem  is  mounted  with journalling&lt;br /&gt;                       enabled, all data (not just metadata)  is  committed&lt;br /&gt;                       into  the  journal  prior  to being written into the&lt;br /&gt;                       main filesystem.&lt;br /&gt;&lt;br /&gt;                journal_data_ordered&lt;br /&gt;                       When the  filesystem  is  mounted  with  journalling&lt;br /&gt;                       enabled, all data is forced directly out to the main&lt;br /&gt;                       file system prior to its metadata being committed to&lt;br /&gt;                       the journal.&lt;br /&gt;&lt;br /&gt;                journal_data_writeback&lt;br /&gt;                       When  the  filesystem  is  mounted  with journalling&lt;br /&gt;                       enabled, data may be written into the main  filesys-&lt;br /&gt;                       tem  after  its  metadata  has been committed to the&lt;br /&gt;                       journal.  This may increase throughput, however,  it&lt;br /&gt;                       may  allow old data to appear in files after a crash&lt;br /&gt;                       and journal recovery.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;So the default mount option is with "journal_data_ordered". This is considered the fastest option, but at the expense of full data recovery in the event of a power outage etc. You can look at many of the tunable parameters with 'tune2fs -l /dev/hdx' or in my case as I'm using LVM:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;# tune2fs -l /dev/mapper/VolGroup00-LogVol00&lt;br /&gt;tune2fs 1.38 (30-Jun-2005)&lt;br /&gt;Filesystem volume name:   &lt;none&gt;&lt;br /&gt;Last mounted on:          &lt;not&gt;&lt;br /&gt;Filesystem UUID:          b0c69d9c-234f-444d-ba95-f979a4902f4d&lt;br /&gt;Filesystem magic number:  0xEF53&lt;br /&gt;Filesystem revision #:    1 (dynamic)&lt;br /&gt;Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file&lt;br /&gt;Default mount options:&lt;br /&gt;Filesystem state:         clean&lt;br /&gt;Errors behavior:          Continue&lt;br /&gt;Filesystem OS type:       Linux&lt;br /&gt;Inode count:              19005440&lt;br /&gt;Block count:              19005440&lt;br /&gt;Reserved block count:     950272&lt;br /&gt;Free blocks:              5362926&lt;br /&gt;Free inodes:              18381437&lt;br /&gt;First block:              0&lt;br /&gt;Block size:               4096&lt;br /&gt;Fragment size:            4096&lt;br /&gt;Reserved GDT blocks:      1024&lt;br /&gt;Blocks per group:         32768&lt;br /&gt;Fragments per group:      32768&lt;br /&gt;Inodes per group:         32768&lt;br /&gt;Inode blocks per group:   1024&lt;br /&gt;Filesystem created:       Wed Jul  6 20:23:44 2005&lt;br /&gt;Last mount time:          Thu May 25 10:03:33 2006&lt;br /&gt;Last write time:          Thu May 25 10:03:33 2006&lt;br /&gt;Mount count:              226&lt;br /&gt;Maximum mount count:      -1&lt;br /&gt;Last checked:             Wed Jul  6 20:23:44 2005&lt;br /&gt;Check interval:           0 (&lt;none&gt;)&lt;br /&gt;Reserved blocks uid:      0 (user root)&lt;br /&gt;Reserved blocks gid:      0 (group root)&lt;br /&gt;First inode:              11&lt;br /&gt;Inode size:               128&lt;br /&gt;Journal inode:            8&lt;br /&gt;First orphan inode:       695882&lt;br /&gt;Default directory hash:   tea&lt;br /&gt;Directory Hash Seed:      11dc53e2-545c-4880-a6a6-792557a40a3d&lt;br /&gt;Journal backup:           inode blocks&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The value 'Default mount options: ' is empty meaning its only using the meta-data journaling. To set a new value here we run:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;# tune2fs -o journal_data /dev/mapper/VolGroup00-LogVol00&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;NOTE: I've run this command on a mounted file system (in fact on the root file system / ) with no ill effects. However, if you are concerned about your data (and I suggest you always have backups) then only run this command on file systems after they are dismounted; either boot in rescue mode or from a bootable cd like Knoppix.&lt;br /&gt;&lt;br /&gt;Also, we can edit our /etc/fstab to set the default mount option there by adding the "data=journal" option:&lt;br /&gt;&lt;br /&gt;/dev/VolGroup00/LogVol00 /                       ext3    defaults,noatime,data=journal        1 1&lt;br /&gt;&lt;br /&gt;Thats it. We now need to reboot the system (for / ) or remount (for any other file system)  to begin taking advantage of full data journaling.&lt;br /&gt;&lt;br /&gt;I've not noticed any performance degredation with "journal_data" and have heard reports that it is actually &lt;a href="http://www-128.ibm.com/developerworks/linux/library/l-fs8.html#4"&gt;faster in some circumstances&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114858127989667235?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114858127989667235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114858127989667235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114858127989667235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114858127989667235'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/05/ext3-and-full-data-journaling.html' title='Ext3 and full data journaling'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114856911567463204</id><published>2006-05-25T14:47:00.000+01:00</published><updated>2006-05-25T16:16:37.196+01:00</updated><title type='text'>Encryption with LUKS, Gnome and HAL</title><content type='html'>I've been playing around with the various disk/file encryption methods for Linux and I'm particulcarly impressed by LUKS on the Gnome desktop as described &lt;a href="http://blog.fubar.dk/?p=64"&gt;here&lt;/a&gt;. LUKS is a standard for hard disk encryption using the linux kernel (2.6) crypto API and dm-crypt mapper.&lt;br /&gt;&lt;br /&gt;What I really wanted from disk encryption was ease of use and cross platform portability. I have tried out &lt;a href="http://www.truecrypt.org/"&gt;truecrypt&lt;/a&gt;  which fits the bill for  being cross platform  but I found is still a little tedious for use on the desktop (perhaps I'll do another post about my adventures with truecrypt).&lt;br /&gt;&lt;br /&gt;Anyhow, LUKS/HAL only just made it into Fedora Core 5 (without much fanfare) and really does make linux disk encryption easy; encrypt your partition, create a file system, plug in your device! The instructions below were based of the how-to from &lt;a href="http://www.raoul.shacknet.nu/2005/11/10/encrypt-devices-using-dm-crypt-and-luks/"&gt;here&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;1. Identify the volume you will be encry&lt;span style="font-style: italic;"&gt;&lt;/span&gt;pting with dmesg. In my case the partition is /dev/sda1 on an external usb2 hard disk which I had previously created with fdisk.&lt;br /&gt;&lt;br /&gt;2. Make sure the device is not mounted:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;# umount /dev/sda1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3. Create the LUKS partition on the usb drive:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;# cryptsetup --verbose --cipher "aes-cbc-essiv:sha256" --key-size 256 -verify-passphrase luksFormat /dev/sda1&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Enter and confirm the passphrase for the volume. I suggest using a long passphrase (at least 10 characters, but the more the better obviously!) with a mix of case and numbers.&lt;br /&gt;&lt;br /&gt;4. Create a device mapping from the virtual crypto volume to the physical device:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;# cryptsetup luksOpen /dev/sda1 usbdisk&lt;/span&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;This will create a block device /dev/mapper/usbdisk.&lt;br /&gt;&lt;br /&gt;5. Make a new file system on our new device:&lt;br /&gt;&lt;br /&gt;# mkfs.vfat -v -F 32 -n "20GB USB" /dev/mapper/usbdisk&lt;br /&gt;&lt;br /&gt;This will create a FAT32 file system on my external usb disk (I hope to use this with windows too at some point!)&lt;br /&gt;&lt;br /&gt;6. Now we just unplug and re-insert the usb disk and:&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Unlock%20Encrypted%20Data.2.png"&gt;&lt;img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Unlock%20Encrypted%20Data.2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Up pops the password dialogue box for our disk! Enter the passphrase for the volume and the disk will be mounted in /media with a conveniant shortcut on the desktop.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114856911567463204?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114856911567463204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114856911567463204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114856911567463204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114856911567463204'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/05/encryption-with-luks-gnome-and-hal.html' title='Encryption with LUKS, Gnome and HAL'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114667084277312514</id><published>2006-05-03T16:25:00.000+01:00</published><updated>2006-05-03T17:55:28.630+01:00</updated><title type='text'>Sony Ericsson K750i</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/sony-ericsson-k750i-large.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/945/2343/320/sony-ericsson-k750i-large.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I've recently bought myself a new mobile phone, and I'm pleasently surprised by how well it works with Linux. Below is the output from dmesg after pluging the phone into a usb port:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:07 poseidon kernel: usb 7-1.3: new full speed USB device using ehci_hcd and address 10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:07 poseidon kernel: usb 7-1.3: configuration #1 chosen from 1 choice&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:07 poseidon kernel: cdc_acm 7-1.3:1.1: ttyACM0: USB ACM device&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:07 poseidon kernel: cdc_acm 7-1.3:1.3: ttyACM1: USB ACM device&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:07 poseidon kernel: scsi4 : SCSI emulation for USB Mass Storage devices&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel:   Vendor: Sony Eri  Model: Memory Stick      Rev: 0000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel:   Type:   Direct-Access                      ANSI SCSI revision: 00&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel: SCSI device sdb: 126912 512-byte hdwr sectors (65 MB)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel: sdb: Write Protect is off&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel: sdb: assuming drive cache: write through&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel: SCSI device sdb: 126912 512-byte hdwr sectors (65 MB)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel: sdb: Write Protect is off&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel: sdb: assuming drive cache: write through&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel:  sdb: sdb1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel: sd 4:0:0:0: Attached scsi removable disk sdb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:12 poseidon kernel: sd 4:0:0:0: Attached scsi generic sg2 type 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;May  3 16:21:15 poseidon kernel: SELinux: initialized (dev sdb1, type vfat), uses genfs_contexts&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;The on-board memory stick (which I must upgrade as it's only 64mb!) is automatically mounted by gnome with a removable file-system icon on the desktop. Gthumb even starts and asks if I wish to import photo's! I can even use the phone as a modem (dev/ttyACM0) when connect via the supplied usb cable. Presumably I'll be able to use the K750i as a modem over bluetooth as I was with my previous T610, but I've not tried yet...&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114667084277312514?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114667084277312514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114667084277312514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114667084277312514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114667084277312514'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/05/sony-ericsson-k750i.html' title='Sony Ericsson K750i'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114666670610697053</id><published>2006-05-03T15:29:00.000+01:00</published><updated>2006-06-27T12:16:40.436+01:00</updated><title type='text'>Sendmail, dovecot, squirrelmail and Maildir</title><content type='html'>I had to advise somebody today on how to configure sendmail/dovecot/squirrelmail with Maildir. There really is no excuse not to switch to Maildir; it's both faster than mbox and supports sub directories!&lt;br /&gt;I know this works on Fedora 4/5 so I just thought I'd post the config before I forget:&lt;br /&gt;&lt;br /&gt;/etc/procmailrc (just the one line needed)&lt;br /&gt;DEFAULT=$HOME/Maildir/&lt;br /&gt;&lt;br /&gt;/etc/dovecot.conf (replace the appropriate line in your existing config)&lt;br /&gt;default_mail_env = maildir:/%h/Maildir&lt;br /&gt;&lt;br /&gt;/usr/share/squirrelmail/config/config.php (this section is near the beginning of the file)&lt;br /&gt;$domain                 = 'yourdomain.com';&lt;br /&gt;$imapServerAddress      = 'localhost';&lt;br /&gt;$imapPort               = 143;&lt;br /&gt;$useSendmail            = true;&lt;br /&gt;$smtpServerAddress      = 'localhost';&lt;br /&gt;$smtpPort               = 25;&lt;br /&gt;$sendmail_path          = '/usr/sbin/sendmail';&lt;br /&gt;$pop_before_smtp        = false;&lt;br /&gt;$imap_server_type       = 'courier';&lt;br /&gt;$invert_time            = false;&lt;br /&gt;$optional_delimiter     = '.';&lt;br /&gt;$encode_header_key      = '';&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114666670610697053?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114666670610697053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114666670610697053' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114666670610697053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114666670610697053'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/05/sendmail-dovecot-squirrelmail-and.html' title='Sendmail, dovecot, squirrelmail and Maildir'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114545049859705878</id><published>2006-04-19T13:16:00.000+01:00</published><updated>2006-04-19T13:41:38.616+01:00</updated><title type='text'>Problems with yum</title><content type='html'>I recently upgraded both my laptop and desktop from FC4 to FC5, starting with my laptop as a testbed. All went well with my laptop (well, pretty much anyway) so I decided I was ready to go ahead with the desktop upgrade. First thing after the upgrade of course, I needed to run a 'yum update' to get all the software package updates, particularly the kernel upgrade which would allow the use of nvidia drivers. Imagine my annoyance when I got this from the 'yum update' command:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;i&gt;&lt;i&gt;failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;/i&gt;&lt;/pre&gt;&lt;div style="text-align: left; font-family: times new roman;"&gt;&lt;span style="font-family: georgia;"&gt;I tried all sorts of cures: Re-installing yum, re-installing fedora-release rpm. All failed with the same error. It turns outs that you need to remove a 'nisplus' entry (if you have one) on the hosts line of /etc/nsswitch.conf.&lt;br /&gt;&lt;br /&gt;Overall though, I'm very pleased with FC5; it's polished, fast and beginning to show what desktop linux is capable of.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114545049859705878?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114545049859705878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114545049859705878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114545049859705878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114545049859705878'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/04/problems-with-yum.html' title='Problems with yum'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114112790546962413</id><published>2006-02-28T10:31:00.000Z</published><updated>2006-02-28T11:58:25.606Z</updated><title type='text'>Security Updates</title><content type='html'>&lt;div style="text-align: justify;"&gt;Having had much more free time recently (or at least not being at work) I've had time to review my network security. What started out as annoyance at looking at /var/log/secure daily and seeing multiple attempts to access my system via brute-force ssh, combined with an interest to learn a few new skills turned into  something of an obsession with locking down just about every application and service I could find.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;It all started with my log files. Day after day, my host on the LAN which had ssh forwarded to it was logging numerous failed attempts from all over the world to login, and I was not alone; reports of the same activity are all over the internet of brute-force attacks. Initially it didn't seem very worrying as the usernames sent were all of the type root, apache, mysql, admin and I had only allowed myself to login via ssh in the config file. Later though I noticed all sorts of other names being sent so it was inevitable that mine would be used at some point, and sometimes the same IP address would be logged several hundred times just in one day. I was reluctant to disable the forwarding rule on my firewall at this time as I was finding remote access too useful. My first counter-measure was &lt;a href="http://denyhosts.sourceforge.net/"&gt;denyhosts&lt;/a&gt;, a script which runs as a cronjob searching the logfiles for repeated failed login attempts (you can set the threshold) then adding these IP addresses to /etc/hosts.deny. This did indeed work as my steadily growing hosts.deny faile proved, but the attacks continued and I still felt uneasy. What if some one got lucky between runs of the cronjob? Next on the list of defenses was public-key access. Yes I admit that I was still using username/password combination; I'd simply never got around to understanding how to apply public-key crypto to ssh. I'm not going to explain here either as there are many excellent guides already on the internet such as Steve Friedl's &lt;a href="http://www.unixwiz.net/techtips/putty-openssh.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;At about the same kind of time I discovered &lt;a href="http://openvpn.net/"&gt;openvpn&lt;/a&gt;, an SSL site to site vpn which supports most flavours of Linux/Unix as well as Mac and Windows. Even better, its released under the GPL. Unlike many 'SSL' vpn's you may have seen/heard about which are just web front ends to applications, openvpn is a true network level (OSI 2/3) vpn solution which while using the proven security of openssl, avoids the complexity and problems of ipsec. Once you've got your head around generating and deploying the certificates it really is so easy to setup, with easy to read config files only a few lines long for the most simple configurations (the openvpn website has a lot of good documentation/exampls and a quick start guide). You may have guessed by now that I really like it :) - Anyway, I started thinking - why use ssh when I've got openvpn which is at least as secure now (probably more so) and which also gives me access to my entire network remotely?&lt;br /&gt;&lt;br /&gt;So now ssh forwarding is turned off on my firewall and I use openvpn for remote access. There is still loads that I haven't mentioned yet like clamav, WPA, rkhunter, truecrypt. I'll have to write part 2 later..... &lt;a href="http://denyhosts.sourceforge.net/"&gt;&lt;span class="" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;  &lt;span class="" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114112790546962413?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114112790546962413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114112790546962413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114112790546962413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114112790546962413'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/02/security-updates.html' title='Security Updates'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114095766647807678</id><published>2006-02-26T12:31:00.000Z</published><updated>2006-02-26T12:41:06.486Z</updated><title type='text'>Fedora Core 4, DHCP and DNS Dynamic Update</title><content type='html'>Having previously posted about dynamic update with Solaris 10 reminded my of my earlier problems with FC4 in updating my dns records with BIND (via dhcpd). Whilst I thought about it I'd thought I'd add the solution that worked for my laptop here. Create a file called /etc/dhclient.conf with the following content:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;send host-name "myhostname";&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;For further information: man dhclient , man dhclient.conf&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114095766647807678?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114095766647807678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114095766647807678' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114095766647807678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114095766647807678'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/02/fedora-core-4-dhcp-and-dns-dynamic.html' title='Fedora Core 4, DHCP and DNS Dynamic Update'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114079891361778884</id><published>2006-02-24T16:22:00.000Z</published><updated>2006-02-24T16:36:15.233Z</updated><title type='text'>Solaris 10, DHCP and DNS Dynamic Update</title><content type='html'>I recently managed to find the time to install Solaris 10 on my Ultra2. Since I've now moved away from assigning static ip's on my network (except for a few essential hosts) I choose the DHCP option when running the installer. Interestingly the installer never asked for a hostname during setup and sure enough when I first booted my Ultra2 it was now known as 'unknown' and of course no hostname was registered in DNS. To fix this I created the file /etc/nodename which contained just the hostname for the system and /etc/hostname.hme0 which contains one line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;inet hostname&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The suffix in the above file name refers to the interface name.&lt;br /&gt;&lt;br /&gt;A reboot later my Ultra2 was successfully registering its hostname in DNS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114079891361778884?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114079891361778884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114079891361778884' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114079891361778884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114079891361778884'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/02/solaris-10-dhcp-and-dns-dynamic-update.html' title='Solaris 10, DHCP and DNS Dynamic Update'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114079407689789630</id><published>2006-02-24T15:01:00.000Z</published><updated>2006-02-24T15:14:36.906Z</updated><title type='text'>All things google</title><content type='html'>Following an invite by my friend Marcus to join googlemail, I have now signed up for their free webspace with the beta &lt;a href="http://pages.google.com"&gt;Google Pages&lt;/a&gt; an AJAX web publishing application. Had a quick play but I'm not quite sure what I'm going to do with it yet (which probably puts me in the same boat as all the other people who signed up on day one just to see what all the fuss was about). Anyway, this all brought me to yet another google offering: blogspot. Will I have the time for this? Time will tell....&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114079407689789630?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114079407689789630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114079407689789630' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114079407689789630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114079407689789630'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/02/all-things-google.html' title='All things google'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22954568.post-114079003172846281</id><published>2006-02-24T14:04:00.000Z</published><updated>2006-02-24T14:07:11.726Z</updated><title type='text'>All things have a beginning</title><content type='html'>OK, so we can't preview unless we've got a posting. Fair enough.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22954568-114079003172846281?l=patgardner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://patgardner.blogspot.com/feeds/114079003172846281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22954568&amp;postID=114079003172846281' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114079003172846281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22954568/posts/default/114079003172846281'/><link rel='alternate' type='text/html' href='http://patgardner.blogspot.com/2006/02/all-things-have-beginning.html' title='All things have a beginning'/><author><name>Pat</name><uri>http://www.blogger.com/profile/17150767391578917029</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
