tag:blogger.com,1999:blog-229545682024-03-05T13:53:30.446+00:00Pat GardnerLinux, Unix, Software.....
Things I've done recorded here so I don't forget.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.comBlogger38125tag:blogger.com,1999:blog-22954568.post-69157283459471177962013-04-09T11:43:00.000+01:002013-04-09T11:43:21.920+01:00Déjà Dup - Out of space...I use Déjà Dup to backup my Fedora 18 desktop. Déjà Dup being a graphical front-end to duplicity.<br />
<br />
Recently these backups ceased to work, with Déjà Dup complaining that it didn't have sufficient space to continue. A quick investigation showed almost all of the 4GB of /tmp was being utilized. Obviously a deep flaw in the design of Déjà Dup, but in the meantime I needed to get the backups working once again.<br />
<br />
What needs to be done is to set the variable TMPDIR to somewhere with more free space and then run Déjà Dup. In my case running this from the terminal was enough to get the backup working:<br />
<br />
<strong>TMPDIR=/data/tmp /usr/bin/deja-dup --backup</strong><br />
<br />
For a more permanent solution put the TMPDIR variable in .profile<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-56529286594559112162013-03-21T09:23:00.002+00:002013-04-09T11:45:02.709+01:00HP Microserver Remote Management CardThe optional HP Microserver Remote Management Card (BMC/RAC, call it what you will) features IPMI, which I previously had configured using OpenIPMI on my Centos 6.3 system. There was one issue that required working around, in that the BMC address as reported by the BIOS was 0xCA8 rather than the real address of 0xCA2. To get the ipmi module to load you had to create the file:<br />
<br />
<b>/etc/modprobe.d/ipmi.conf</b><br />
<b><br /></b>
Containing:<br />
<br />
<b>options ipmi_si type=kcs ports=0xca2</b><br />
<br />
That all worked nicely until I upgraded the server to Centos 6.4, at which point IPMI stopped working completely. What has happened is that RHEL now has the ipmi driver built into kernel and not as a loadable module any more (who's bright idea?).<br />
<br />
You can read all about the driver <a href="https://www.kernel.org/doc/Documentation/IPMI.txt">here.</a><br />
<br />
The fix is now to pass the driver options to the kernel at boot by appeneding the cmdline for the kernel in GRUB with:<br />
<br />
<b>ipmi_si.type=kcs ipmi_si.ports=0xca2</b>Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-27963301047892693822012-07-08T13:16:00.001+01:002012-07-08T13:16:30.135+01:00OS X Lion and CUPS BrowsingMy D-Link print server having been killed by a power surge I needed an alternative method for sharing my printer on the network.<br />
<br />
Simple, I thought. Plug it into the USB port of my CentOS server, enable CUPS and away you go. After all, OS X has CUPS built in, doesn't it?<br />
<br />
Well..yes, sort of. But as I found out, only Bonjour support is enabled so Lion just doesn't see CUPS broadcasts on the network.<br />
<br />
To enable CUPS browsing as well as Bonjour open a terminal and run:<br />
<br />
<em><strong>cupsctl BrowseProtocols='"cups dnssd"'</strong></em>Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-70910462122531698322012-03-15T23:00:00.000+00:002012-03-15T23:00:17.771+00:00GRUB2I've been trying to get to grips with GRUB2 which has now become the default boot loader on Fedora. In the past if you had wanted to edit the boot menu it was a simple matter of vi'ing /boot/grub/grub.conf<br />
<br />
No more.<br />
<br />
The new grub configuration file (/boot/grub2/grub.cfg) explicitly states not to edit it manually.<br />
<br />
The method now is to edit /etc/default/grub then run this command as root (or sudo):<br />
<br />
<b>grub2-mkconfig -o /boot/grub2/grub.cfg</b>Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-24161259942198192342012-03-15T21:32:00.000+00:002012-03-15T21:35:21.087+00:00Fedora Desktop AppsJust finally got around to upgrading my ancient (in Fedora terms) desktop to the shiny new F16. I happen to like Gnome 3; very clean looking.<br />
<br />
Anway, a couple of good desktop applications I've discovered that I hadn't been aware until recently are: <a href="http://hotot.org/">Hotot</a> (a twitter client) and <a href="http://vagalume.igalia.com/">Vagalume</a> (a last.fm client).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwKRwb81quI8XkyKa8vUQTXtrptOUp6oBXqu4lAthYtstAhyphenhyphenhwgwmyES0eNqyWXwox7EY2vMPDDUEzhUTA1XynX5XpQnvVuElLL26N_mlggpKoEXHPDZNqGC6T-QtOmyDgqJ_4/s1600/Screenshot+at+2012-03-15+21:10:48.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwKRwb81quI8XkyKa8vUQTXtrptOUp6oBXqu4lAthYtstAhyphenhyphenhwgwmyES0eNqyWXwox7EY2vMPDDUEzhUTA1XynX5XpQnvVuElLL26N_mlggpKoEXHPDZNqGC6T-QtOmyDgqJ_4/s320/Screenshot+at+2012-03-15+21:10:48.png" width="320" /></a></div>
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-794934498266662922008-07-16T11:50:00.004+01:002013-04-09T13:06:55.754+01:00Solaris 10 ipfilterQuick guide for ipfilter on Solaris 10<br />
<br />
IP Filter home page:<br />
<a href="http://coombs.anu.edu.au/~avalon/">http://coombs.anu.edu.au/~avalon/</a><br />
<br />
Documentation for IPF is also available from:<br />
<a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-ipf.html">http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-ipf.html</a><br />
<br />
<br />
Enable interfaces to be used with packet filtering:<br />
<br />
<span style="font-weight: bold;">Edit /etc/pfil/pfil.ap (old way...now seems to require editing /etc/iu.ap)</span><br />
<br />
Uncomment the device names to enable or add a line to specify the interface:<br />
<br />
<span style="font-weight: bold;">hme0 -1 0 pfil</span><br />
<br />
For the changes to take effect:<br />
<br />
1. svcadm restart /network/pfil and replumb the interfaces<br />
or<br />
2. Reboot<br />
<br />
Set the ipfilter service to enabled:<br />
<br />
<span style="font-weight: bold;">svcadm enable network/ipfilter and replumb the interfaces or reboot</span><br />
<br />
By default the configuration files in /etc/ipf will be read at startup<br />
<br />
ipf.conf - ipv4 filtering rules<br />
ipf6.conf - ipv6 filtering rules (if ipv6 is configured)<br />
ipnat.conf - NAT rules (optional)<br />
ippool.conf - refer to many address by a single group name (optional)<br />
<br />
A simple ipf.conf to block and log all traffic other than ssh would contain:<br />
<br />
<span style="font-weight: bold;">pass out quick all keep state<br />pass in quick on hme0 proto tcp from any to any port = 22 keep state<br />block in log all </span><br />
<br />
Filtering rules can be loaded from alternative locations:<br />
<br />
<span style="font-weight: bold;">ipf -f filename</span><br />
<br />
As can NAT rules:<br />
<br />
<span style="font-weight: bold;">ipnat -f filename</span><br />
<br />
<br />
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.<br />
<br />
To switch between the active and inactive rule sets:<br />
<br />
<span style="font-weight: bold;">ipf -s</span><br />
<br />
To modify packet filtering behaviour:<br />
<br />
<span style="font-weight: bold;">ipf -Fa (remove both incoming and outgoing rule sets)<br /><br />ipf -Fo (remove outgoing rules only)<br /><br />ipf -Fi (remove incoming rules only)<br /><br />ipf -D (disable all packet filtering)<br /><br />ipf -E (enable packet filtering)</span><br />
<br />
<br />
To view currently loaded rules for the active set:<br />
<br />
<span style="font-weight: bold;">ipfstat -io</span><br />
<br />
To view currently loaded rules for the inactive set:<br />
<span style="font-weight: bold;"><br />ipfstat -I -io</span><br />
<br />
To remove all the runnings rules and load a new set from a file:<br />
<br />
<span style="font-weight: bold;">ipf -Fa -f filename</span><br />
<br />
To load rules to the inactive rule set:<br />
<br />
<span style="font-weight: bold;">ifp -I -f filename</span><br />
<br />
To append rules to the current active rule set:<br />
<br />
<span style="font-weight: bold;">echo "block in log on hme0 proto tcp from any to any port = 25" | ipf -f -</span><br />
<br />
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:<br />
<br />
<span style="font-weight: bold;">pass out quick all keep state<br />pass in quick on hme0 proto icmp from any to any icmp-type 8 keep state <br />pass in quick on hme0 proto tcp from any to 192.168.93.128 port = ssh keep state<br />pass in quick on hme0 proto udp from any to 192.168.93.132/32 port = 80 keep state<br />block in log all</span>Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-72184898349782252192008-07-16T11:50:00.001+01:002013-04-09T13:07:42.292+01:00PaTcH_MsG 8 Version of is not installed on this systemI had to manually run some of the patches in the Solaris patch cluster recently but got this error:<br />
<br />
> ./checkinstall: .: filename argument required <br />
> .: usage: . filename <br />
> PaTcH_MsG 8 Version of is not installed on this system.<br />
<br />
To fix make sure that the directory tree all the way down to the patch is executable by 'nobody'.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com1tag:blogger.com,1999:blog-22954568.post-5422914835250438172007-03-01T16:08:00.000+00:002007-03-01T16:23:41.151+00:00setuid wrapper<div align="left">I needed to run a script with root privileges,but had<br /> 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:<br /><br /><br /><i><strong>#include <unistd.h><br />#include <stdio.h><br /><br />#define myfile "/path/to/script"<br /><br />main(argc, argv)<br />char **argv;<br />{<br /> setuid(0);<br /> seteuid(0);<br /> execv(myfile, argv);<br />}</strong></i><br /><br /></div>Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com2tag:blogger.com,1999:blog-22954568.post-23851304264089399882007-01-17T22:18:00.000+00:002007-01-17T22:30:40.285+00:00Fix for acroread<div align="justify"><div align="justify">Adobe reader fails to start on the Gnome desktop on Fedora 6. There <br />seems to be a conflict withscim (smart common input method). <br />The fix is to add the following to the top of /usr/bin/acroread:<br /><div align="justify"><br /></div></div><strong><i>export GTK_IM_MODULE=xim</i></strong><br /></div>Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1165273129843109362006-12-04T22:48:00.000+00:002013-04-09T13:08:38.325+01:00GRUB errorsAfter 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:<br />
<br />
GRUB _<br />
<br />
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".<br />
<br />
This fixed my first problem but now boot was hanging at:<br />
<br />
GRUB loading stage 2<br />
<br />
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).<br />
<br />
Next boot all was well.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1165010278897669852006-12-01T21:52:00.000+00:002006-12-01T21:59:18.876+00:00X Forwarding problemsI'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):<br /><br /><span style="font-style:italic;">debug1: Requesting X11 forwarding with authentication spoofing.<br />debug1: Remote: No xauth program; cannot forward with spoofing.<br /></span><br />Turns out the solution is to install xauth: <br /><br /><span style="font-style:italic;"># yum install xorg-x11-xauth.i386</span>Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1157728919804941842006-09-08T16:01:00.000+01:002006-09-08T16:21:59.876+01:00Configuring apache for webdavI 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:<br /><br /><Location /cal><br />DAV On<br />AuthType Basic<br />AuthName "WebDAV Restricted"<br />AuthUserFile /var/www/.htusers<br />require user myuser<br /></Location><br /><br />The location directive refers to a directory called "cal" located at the root of my webserver created with:<br /><br />mkdir -p /var/www/html/cal<br />chown apache:apache /var/www/html/cal<br /><br />"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.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1156772698134015202006-08-28T11:43:00.000+01:002006-08-28T16:05:38.386+01:00Secure IMAP with Dovecot and SSLIn 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.<br /><br />By default on FC5 Dovecot allows the following protocols:<br /><br /><span style="font-style:italic;">imap imaps pop3 pop3s </span><br /><br />To only allow imaps we must set:<br /><br /><span style="font-style:italic;">protocols = imaps</span><br /><br />in /etc/dovecot.conf<br /><br />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:<br /><br /><span style="font-style:italic;">#!/bin/sh<br /><br /># Generates a self-signed certificate.<br /># Edit dovecot-openssl.cnf before running this.<br /><br />OPENSSL=${OPENSSL-openssl}<br />#SSLDIR=${SSLDIR-/etc/ssl}<br />SSLDIR=${SSLDIR-/etc/pki/dovecot}<br />OPENSSLCONFIG=${OPENSSLCONFIG-/etc/pki/dovecot/dovecot-openssl.cnf}<br /><br />CERTFILE=$SSLDIR/certs/dovecot.pem<br />KEYFILE=$SSLDIR/private/dovecot.pem</span><br /><br />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.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1155328862866261312006-08-11T21:20:00.000+01:002006-08-11T21:44:12.073+01:00CUPS BrowsingThe 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:<br /><br /><span style="font-style:italic;">BrowseAddress aaa.bbb.ccc.ddd<br />BrowseAddress @LOCAL<br />BrowseAddress @IF(name)<br /></span><br />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.<br /><br />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:<br /><br /><span style="font-style:italic;">BrowseDeny badhost.example.net (requires "HostNameLookups On")<br />BrowseDeny 192.168.1.10<br />BrowseDeny @IF(eth1)<br /></span>Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1154718708109750002006-08-04T20:07:00.000+01:002006-08-04T20:11:48.120+01:00Solaris and man page troublesAfter a fresh install of Solaris I was unable to use "man -k" as I was getting:<br /><br /><span style="font-style:italic;">/usr/share/man/windex: No such file or directory</span><br /><br />The solution is to run "catman -w" and all is well.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1152108073074932122006-07-05T14:44:00.000+01:002006-07-05T21:53:11.803+01:00Xgl on Fedora Core 5I've got <a href="http://en.wikipedia.org/wiki/Xgl">Xgl</a> running by following the instructions <a href="http://forums.fedoraforum.org/showthread.php?t=111771">here</a>. 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.<br /><br />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.<br /><br />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'.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1151535933513210842006-06-28T23:34:00.000+01:002006-06-29T00:05:33.570+01:00Remote name daemon control (rndc) for BINDUsing 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:<br /><br /><span style="font-style:italic;">Usage: rndc [-c config] [-s server] [-p port]<br /> [-k key-file ] [-y key] [-V] command<br /><br />command is one of the following:<br /><br /> reload Reload configuration file and zones.<br /> reload zone [class [view]]<br /> Reload a single zone.<br /> refresh zone [class [view]]<br /> Schedule immediate maintenance for a zone.<br /> retransfer zone [class [view]]<br /> Retransfer a single zone without checking serial number.<br /> freeze zone [class [view]]<br /> Suspend updates to a dynamic zone.<br /> thaw zone [class [view]]<br /> Enable updates to a frozen dynamic zone and reload it.<br /> reconfig Reload configuration file and new zones only.<br /> stats Write server statistics to the statistics file.<br /> querylog Toggle query logging.<br /> dumpdb [-all|-cache|-zones] [view ...]<br /> Dump cache(s) to the dump file (named_dump.db).<br /> stop Save pending updates to master files and stop the server.<br /> stop -p Save pending updates to master files and stop the server<br /> reporting process id.<br /> halt Stop the server without saving pending updates.<br /> halt -p Stop the server without saving pending updates reporting<br /> process id.<br /> trace Increment debugging level by one.<br /> trace level Change the debugging level.<br /> notrace Set debugging level to 0.<br /> flush Flushes all of the server's caches.<br /> flush [view] Flushes the server's cache for a view.<br /> flushname name [view]<br /> Flush the given name from the server's cache(s)<br /> status Display status of the server.<br /> recursing Dump the queries that are currently recursing (named.recursing)<br /> *restart Restart the server.<br /><br />* == not yet implemented<br />Version: 9.3.2</span><br /><br />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.<br /><br />So now you can do cool stuff like turn query logging on and off with:<br /><br /><span style="font-style:italic;"># rndc querylog<br /># ping -c 1 www.google.com<br /># tail /var/log/messages<br />Jun 28 23:48:21 poseidon named[1986]: query logging is now on<br />Jun 28 23:48:48 poseidon named[1986]: client 192.168.116.10#33362: query: www.google.com IN A +<br /># rndc querylog<br /># tail /var/log/messages<br />Jun 28 23:51:32 poseidon named[1986]: query logging is now off</span><br /><br />You can dump the name server cache with the command:<br /><br /><span style="font-style:italic;"># rndc dumpdb -cache<br /></span><br />The dump file will be specified in the named.conf file in the options directive:<br /><br /><span style="font-style:italic;">dump-file "/var/named/data/cache_dump.db";</span><br /><br />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.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1151443864915024692006-06-27T22:13:00.000+01:002006-06-27T22:31:04.933+01:00DB2 upgradeI 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:<br /><br /><span style="font-style:italic;">[db2inst1@medusa ~]$ db2cc<br /> stackpointer=0x1c3aa4<br />Writing Java core file ....<br />Written Java core to /tmp/javacore11599.1151439455.txt<br />DB2JAVIT : RC = 11</span><br /><br />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:<br /> <br /><span style="font-style:italic;">db2 update dbm cfg using JDK_PATH /opt/IBMJava2-142</span>Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1151188599188056562006-06-24T23:07:00.000+01:002006-06-24T23:36:39.240+01:00Mirroring websites with wgetI'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:<br /><br /><span style="font-style:italic;">wget --mirror –w 2 –p --html-extension –-convert-links –P /home/pat/documents/blogger/ http://patgardner.blogspot.com</span><br /><br /><span style="font-weight:bold;">--mirror</span><br /><br />get files recursively, but depending on timestamp<br /><br /><span style="font-weight:bold;">-w</span> <br /><br />wait a number of seconds between retrieval<br /><br /><span style="font-weight:bold;">-p</span> <br /><br />download all page requisites such as images<br /><br /><span style="font-weight:bold;">--html-extension</span> <br /><br />makes sure that all the copies of files have .html file extensions<br /><br /><span style="font-weight:bold;">--convert-links</span> <br /><br />convert links suitable for local viewing<br /><br /><span style="font-weight:bold;">-P</span> <br /><br />path to save files toAnonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1150802714808703682006-06-20T12:16:00.000+01:002006-06-20T12:25:14.816+01:00iFolderI've just discovered <a href="http://www.ifolder.com">iFolder</a>, 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.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1150461448119108372006-06-16T13:30:00.000+01:002006-06-16T13:37:28.130+01:00Slow FirefoxFirefox 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:<br /><br />export MOZ_DISABLE_PANGO=1<br /><br />In your .bash_profile.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1150457392834864572006-06-16T11:18:00.000+01:002006-06-16T12:29:52.913+01:00Zeroconf service discoveryAnother new addition to the latest release of Fedora is <a href="http://avahi.org">avahi</a> support, better known as zeroconf or <a href="http://www.apple.com/macosx/features/bonjour/">bonjour</a> 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.<br /><br />1. Configure some services. The directory /etc/avahi/services is initially empty, so we'll create a few files:<br /><br />apache.service<br />ssh-ftp.service<br />ssh.service<br /><br />We populate the files with the following data:<br /><br /><span style="font-style:italic;"><?xml version="1.0" standalone='no'?><br /><!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br /><service-group><br /> <name>Apache Server Documentation</name><br /> <service><br /> <type>_http._tcp</type><br /> <port>80</port><br /> <txt-record>path=/manual</txt-record><br /> </service><br /></service-group><br /><br /><?xml version="1.0" standalone='no'?><br /><!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br /><service-group><br /> <name replace-wildcards="yes">SFTP File Transfer on %h</name><br /> <service><br /> <type>_sftp-ssh._tcp</type><br /> <port>22</port><br /> </service><br /></service-group><br /><br /><?xml version="1.0" standalone='no'?><br /><!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br /><service-group><br /> <name replace-wildcards="yes">Remote Terminal on %h</name><br /> <service><br /> <type>_ssh._tcp</type><br /> <port>22</port><br /> </service><br /></service-group></span><br /><br />2. Enable the avahi-daemon, and have it auto start on system boot.<br /><br /><span style="font-style:italic;"># service avahi-daemon start<br /># chkconfig avahi-daemon on</span><br /><br />3. We can also enable Gnome file sharing from "Desktop/Preferences/Personal File Sharing" which provides WebDAV access to ~/Public.<br /><br />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:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Network%20-%20File%20Browser.png"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Network%20-%20File%20Browser.png" border="0" alt="" /></a><br /><br />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:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Bookmarks.png"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Bookmarks.png" border="0" alt="" /></a><br /><br />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:<br /><br /><span style="font-style:italic;"># ./configure && make && make install<br /></span><br />You should now be able to add the applet to your gnome-panel:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/zeroconf-applet.png"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/zeroconf-applet.png" border="0" alt="" /></a><br /><br />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.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1149203712966042472006-06-01T23:47:00.000+01:002013-04-09T13:32:19.029+01:00Sendmail SmtpGreetingMessageCall 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...<br />
<br />
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:<br />
<br />
<span style="font-style: italic;">define(`confSMTP_LOGIN_MSG',`message')</span><br />
<br />
Where "message" is a string that must at least contain the localhost name. By default message would be:<br />
<br />
<span style="font-style: italic;">$j Sendmail $v/$Z; $b</span><br />
In sendmail.cf which results in something like:<br />
<br />
<span style="font-style: italic;">220 mailhost.mydomain.com ESMTP Sendmail 8.13.6/8.13.6; Thu, 1 Jun 2006 23:19:51 +0100</span><br />
<br />
Where:<br />
<br />
<span style="font-style: italic;">$j = fully qualified hostname<br />$v = sendmail version<br />$Z = configuration file version<br />$b = current date and time</span><br />
I placed this new definition in my sendmail.mc:<br />
<br />
<span style="font-style: italic;">define(`confSMTP_LOGIN_MSG',`$j MTA ready and waiting ; $b')</span><br />
Which displays:<br />
<br />
<span style="font-style: italic;">220 mailhost.mydomain.com ESMTP MTA ready and waiting ; Fri, 2 Jun 2006 00:06:08 +0100</span><br />
<br />
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.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1149096424410281332006-05-31T16:24:00.000+01:002006-05-31T18:27:04.476+01:00Power ManagementFedora 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.<br /><br />For FC5 you can update the 'gnome-power-manager' to the lastest version by adding this file to /etc/yum.repos.d/ and running:<br /><br /><span style="font-style:italic;"># yum -y update gnome-power-manager.i386</span><br /><br />Restarting your gnome session you get this new applet:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/power-applet.png"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/power-applet.png" border="0" alt="" /></a><br /><br />Choosing "information" from the menu displays extra's that aren't on the official FC5 release:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Power%20Information.png"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Power%20Information.png" border="0" alt="" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Power%20Information-1.png"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Power%20Information-1.png" border="0" alt="" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/945/2343/1600/Screenshot-Power%20Information-2.png"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/945/2343/320/Screenshot-Power%20Information-2.png" border="0" alt="" /></a>Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0tag:blogger.com,1999:blog-22954568.post-1148984010042704672006-05-30T11:05:00.000+01:002006-05-30T11:13:30.050+01:00Loopback file systemsI had to mount a hard disk image today and found <a href="http://www.mega-tokyo.com/osfaq2/index.php/Disk%20Images%20Under%20Linux">this</a> excellent guide for loopback filesystems on Linux.Anonymoushttp://www.blogger.com/profile/17150767391578917029noreply@blogger.com0