ABN Amro Tradebox using linux 
Monday, November 9, 2009, 10:21 PM - General applicable solutions
Issue:

Registration of tradebox fails due to badly written browser and java capability check.

Solution:

No claims due to any losses or mishaps when using this solution can be claimed. The solution is from the ABN Amro helpdesk:
Register using windows. At the end save the jnlp file. Copy the file to any system you want to start tradebox.

P.S. This is scary: The file contains the username/password combination in encrypted format. No user is requested anymore. Do not give to friends, keep in a save place. If lost: Block your accounts!
  |  permalink  |  
Internet explorer does not show a div 
Wednesday, April 16, 2008, 04:24 PM - General applicable solutions
Issue:

Unknown run time error in IE7 occurs while trying to put content in a div with javascript. No errors are to be seen in Firefox.

Solution:

Most likely a reserved keyword has been used as id for the div (like id=submit). Rename the div to another term, and the problem will most likely disappear.
  |  permalink  |  
QMail delivers message many times after mailbox migration 
Saturday, December 1, 2007, 04:32 PM - General applicable solutions
Issue:
Qmail delivers message many times after migration from Plesk to vpopmail setup.

Solution:
Remove "|autoresponder" from .qmail configuration for the troubled user. The queue will than empty itself delivering the messages 1 last time.

  |  permalink  |  
Qmail bounces messages after mailbox migration 
Saturday, December 1, 2007, 04:31 PM - General applicable solutions
Issue:
Qmail bounces email after migration of some mailboxes (from Plesk to vpopmail setup).

The bounce mail from vpopmail:
Hi. This is the qmail-send program at xyz.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<abc@xyz.com>:
This message is looping: it already has my Delivered-To line. (#5.4.6)

Solution:
You setting contains a forward which is not understood by the vpopmail setup of qmail. Replace the .qmail-default file content for this domain with:
| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox

  |  permalink  |  
Pop-up Greybox frame with Flash 
Saturday, July 7, 2007, 02:02 PM - General applicable solutions
Issue:
Greybox provides pop-up frames by altering the href with javascript code. The onclick gets defined.
When wanting to use the same code from Flash, there are some problems with the transparancy of the greybox code.

Solution:
To get the greybox pop-up working correctly, call the javascript from flash with the following function (from greybox examples.html file):
getUrl("javacript:GBFlashCall(caption,url,height,width)");

In which you can set the caption, url, height and width yourself.
Add a script link in the header of you html file after the greybox files, also add the GB_ROOT_DIR, else it will not work:
<script type="text/javascript">
var GB_ROOT_DIR = "./greybox/";
</script>

<script type="text/javascript" src="greybox/AJS.js"></script>
<script type="text/javascript" src="greybox/AJS_fx.js"></script>
<script type="text/javascript" src="greybox/gb_scripts.js"></script>
<script type="text/javascript" src="GBFlashCall.js"></script>
<link href="greybox/gb_styles.css" rel="stylesheet" type="text/css" media="all" />



Create the GBFlashCall.js file with the following content on the correct loction as defined in the <script> call:

GB_myShow = function(caption, url, /* optional */ height, width, callback_fn) {
var options = {
caption: caption,
center_win:true,
height: height || 500,
width: width || 500,
fullscreen: false,
show_loading: true,
callback_fn: callback_fn
}
var win = new GB_Window(options);
return win.show(url);
}

function GBFlashCall(caption, url, height, width) {
myShow(caption, url, height, width);
}

You can alter the true/false options to alter the behaviour of you pop-up, or you can move the options over to flash to get the same results.
  |  permalink  |  
Importing old e-mail from KMail into KMail 
Saturday, August 12, 2006, 06:01 PM - General applicable solutions
The issue

KMail has a range of options to insert old e-mail from other applications, but none for its own e-mail. This piece explains how to import KMail e-mails into KMail.

KMail is able to handle to mail storage types:
- maildir
- mbox
Maildir is the standard selection, and the one which is missed in the import filters of KMail.
The filter of KMail for some reason excludes its own e-mails from the import. This can be solved by renaming the e-mails to the same name but then with a .txt extention.

Rename script
This script renames the files to a .txt extention. Run this in your KMail maildir folder:

#!/bin/bash
files=$(ls -1)
for x in $files
do
mv $x $x.txt
done

The steps to import the e-mail:

The import functionalities can be found under tools, import messages. Since maildir are plain text messages, you want to use the import plain text e-mails option.
The next step is to select the folder where you stored the backup of your KMail. Every folder has 3 sub folders:
- cur
- new
- tmp
The last step is to press next.
The result is that the e-mails are loaded into the folder PLAIN-cur.


  |  permalink  |  
Hacking LaCie ethernet Disk mini to multiple samba shares 
Sunday, February 5, 2006, 07:31 PM - General applicable solutions
Introduction

The LaCie ethernet disk mini 300GB is a linux based device. The early versions of this device with firmware lower than firmware 2.0, are not capable of handling more than one share, which with a networked device is far from optimal. To be able to handle more than one share, this manual has been written. Lacie was also contacted by a Lacie user about this issue, and he also got a response saying that they were already addressing the issue in firmware 2.0. By downloading the firmware, you can add your shares the easy way. If you want to do more, you can use this article to know ahead what you will run into hacking your lacie drive.


Linux based, so what about GPL

Sources can be downloaded from the LaCie website. They use a kernel tailored to there own, and several applications, among which samba and busybox.

Where is the configuration stored

Lacie stores the configuration on the device its harddisk. This makes the task at hand a lot easier. To start with, the partitions can be backupped up easily so in case of trouble they can be restored.
The main system boots from the extended partition in the ethernet disk:
fdisk output:
/dev/hda5 82 Linux swap / Solaris
/dev/hda6 83 Linux // probably /boot, contains the kernel
/dev/hda7 83 Linux // busybox & other applications, also a /etc with basic settings, overridden by /dev/hda8
/dev/hda8 83 Linux // The settings the system uses

The changes

At this moment all what is needed is to edit /etc/samba/smb.conf to an acceptable multiple shares layout. It is handy when you already made the users by using the webinterface, so you only have to address the shares itself. The samba config directs to /home for the standard share. You could keep that for yourself, and add subdirectories in /home (once mounted) to use with samba.

How to apply the changes

Disassemble the ethernetdisk mini by unscrewing the two screws at the back (voids your 2 year warranty!!). Take out the disk and mount it in your pc running linux.
Make backups from /dev/hdX6,7 & 8 with dd.
Mount /dev/hdX8 and edit the smb.conf file to your liking.
Shutdown, reassemble the ethernet disk and start it.
Do not use ethernetdisk mini configurationtools anymore. They will overwrite your new config!

Just a handy change

Since you do not want to disassemble your PC and lacie every time you want to change something, it might be handy to included /dev/hda7 & 8 in your samba configuration file with special permissions. This way you can update the smaba configuration with a text editor and the new config will than be available after reboot.

Further research for adding more features

The CPU in the lacie is a Freescale MPC5200. Some programs need to be compiled for this CPU, based on powerPC architecture, see "Work to be done".

Work to be done

- Add telnet or ssh (preferred ssh), possibly by just downloading a powerPC distro (for example yellow dog linux), and copy the libraries & programs to the lacie.
- Discover what username/password storage is used to have the shared login
- Maybe update the userinterface.
- Maybe put a little bit of pressure on lacie to update their software to accomodate multiple shares, add telnet, and tell which processor architecture is used so nice additions can be made.
(Help is welcome, answers will be posted here ASAP)
  |  permalink  |  
Memory expansion on asus A2500H 
Friday, December 30, 2005, 03:08 PM - General applicable solutions
The memory expansion of an asus notebook of the a2 series (a2500H) is not in the compartment on the bottom of the laptop which they mention in the manual. It is actually under the keyboard of the system. The compartment on the bottom contains a set of copper heatpipes and a passive CPU cooler. It is protected by a void warranty sticker on one of the screws.

So to avoid any problems with warranty:
To get to the correct compartment, take of the bezel above the keyboard by pushing it to the left, it it will not go easy! Break a nail or two, but it is possible. UPDATE: There is a small hole in the bezel, in which a pin can be pushed. By pushing in a pin, you unlock the bezel, and the removal will go easier!
Now you can lift the keyboard by shifting it up a few milimeter and than flip it over. In the middle is a compartment protected by a cover with two screws. Open the compartment, insert the memory and place the keyboard and bezel back at its location.


  |  permalink  |  
Create filesystem in a file 
Wednesday, December 7, 2005, 11:08 PM - General applicable solutions, Linux
To create a filesystem in a file, first a file needs to be create at the size of the filesystem. This can be done with dd:
dd if=/dev/zero of=fileXYZ bs=1024 count=1024
The count can be made bigger to get a bigger file.
Use your favourite filesystem creator on this file, and you will have the filesystem in a file available for all to use.

Mounting the filesystem is done by:
mount fileXYZ /mnt -o loop
  |  permalink  |  related link  |  
findnode: Assertion `key != ((void *)0)' failed 
Monday, December 5, 2005, 11:50 AM - General applicable solutions
Symptom

You are trying to commit a change or a new file in CVS, but it fails with the following error:
cvs [commit aborted]: received abort signal
cvs: hash.c:312: findnode: Assertion `key != ((void *)0)' failed.
cvs commit: saving log message in /tmp/cvsqLE7qZ

Cause

This can have multiple causes, usually filesystem related which made it impossible for CVS to complete the commit action. For example no disk space left of you CVS server.

Solution

Take care that there is enough diskspace for CVS to work and delete the offending file(s) out of your repository. After that commit again and it will work as usual.

  |  permalink  |  
Uptime is reported incorrectly under linux 
Sunday, November 27, 2005, 12:10 AM - General applicable solutions
Symptom:

Uptime program returns wrong value, just a few days instead of the expected 500+ days of uptime.

Solution:

Request your uptime with 'last -xf /var/run/utmp runlevel'. This will return the real uptime of your machine.
  |  permalink  |  
Quick protection against Linux/Lupper worm 
Saturday, November 26, 2005, 11:42 PM - General applicable solutions
McAfee has a description of the worm but not a way to get rid of it in an efficient way, or how to protect your system.
Another description and name at symantec: Linux.Plupii

Protection against the worm

Symantec is helpfull: See point 4 of technical details

An update for the xmlrpc problem will solve the vulnerability there. Link for the version: Click here
For awstats version 6.4 and up is safe.
Webhints is supposed to be not vulnerable, however it is included in the worm. A second look at it would be a wise thing to do. If you run webhints, block the communication ports for this worm just to make sure. Blocking data from and to 62.101.193.244 (the worm download location) is also a good precaution.
Style of attack

It looks like the worm does attack only on the IP address of the server, not name based. The easiest protection, is not to link the IP address of the server to cgi-bin or one of the mentioned files. This is done most easily with a virtual host definition in the apache configuration. A redirect index.html or php (whatever has your preference) to the real website on the server is after that enough to stop the worm.


Getting rid of the worm

Delete the worm. The name of the worm is lupii, just fgrep. If you have the worm, block UDP port 7111 & 7222 on the firewall, and you will run safely with the worm, but with you in control.


Some easy to implement other protections

includer.cgi: Long time known to have vulnerabilities. An up to date version should do the trick, else you should not be using this script at all.

Disclaimer: This comes ofcourse without any warranties!
  |  permalink  |  related link  |