This post is a short howto how I managed to use my Ubuntu 9.10 (Karmic Koala) to log on to the web pages of Norsk Tipping using a USB CardMan 3121 buypass card reader and Firefox web browser.
First of all you need to install Java to login to Norsk Tipping webpages.
# aptitude install sun-java6-jre sun-java6-plugin
I got the following error message while trying to login “Feilreferanse 31503″.
Installing the following packages solved the problem and I am now able to use the webpages to Norsk Tipping just like I do in Windows.
# aptitude install libccid libpcsclite-dev pcscd libpcsclite-dev
Tags: 9.10, Karmic Koala, norsk tipping, sun java, Ubuntu
Posted by Hans-Henry Jakobsen
Force network speed on a network card to 100 MBit Full Duplex and in the same time disable auto negotiation
# ethtool -s eth0 speed 100 duplex full autoneg off
These settings are active until you reboot the machine or restart the network.
In order to keep this change on each system reboot, append the following line in the following Redhat file /etc/sysconfig/network-scripts/ifcfg-eth0
ETHTOOL_OPTS="speed 100 duplex full autoneg off"
An alternative tool to use to change the settings is mii-tool.
Posted by Hans-Henry Jakobsen
This post describes how to make a “Site down for maintenance” notice using Apache .htaccess and the mod_rewrite module.
I assume you know how to enable the Apache htaccess directive and the mod_rewrite module.
First you need to create a .htaccess file in your root level of your website.
Next you add the following lines to it
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/sitedown.html$
RewriteRule $ /sitedown.html [R=302,L]
The .htaccess file should be “active” immediately and you should see the content of your sitedown.html file. If not, try clearing your browsers cache.
If you as a maintenance user would like to access the site without seeing the sitedown.html file, add the following line to enable IP address exception
RewriteCond %{REMOTE_HOST} !^192\.168\.0\.12
Remember to replace the IP address with your address.
The .htaccess file should now look something like this.
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/sitedown.html$
RewriteCond %{REMOTE_HOST} !^192\.168\.0\.12
RewriteRule $ /sitedown.html [R=302,L]
Just delete the .htaccess file when you are done with your maintenance and your site will be available again.
Posted by Hans-Henry Jakobsen
This is just a short post describing Zimbra distribution list (mailinglist) commands.
These commands should be run as the zimbra user
# su - zimbra
List all distribution lists
# zmprov gadl
Print only members addresses of a distribution list
# zmprov gdl mailinglist@example.com | grep zimbraMailForwardingAddress: | awk {'print $2'}
Show if a list is member of another distribution list(s)
# zmprov gdlm mailinglist@example.com
Posted by Hans-Henry Jakobsen
This is a short post that describes how to prepare your USB memory stick for a base installation of Debian Lenny. This will most likely also work on Debian based distributions like Ubuntu.
Download the latest Debian boot.img.gz file
# wget http://people.debian.org/~joeyh/d-i/images/daily/hd-media/boot.img.gz
Download the latest Debian netinst ISO image
# wget http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/debian-testing-i386-netinst.iso
Connect the USB stick in the computer and verify that the drive is recognized in /var/log/messages.
It is now time to write the downloaded files onto your USB stick.
First write the boot information to the stick
# zcat boot.img.gz > /dev/sdb
I am assuming that /dev/sdb is the memory stick. Always check that you are writing to the right device!
Mount the USB stick and copy the installation files from the ISO image
# mount /dev/sdb /media/memstick # cp debian-testing-i386-netinst.iso /media/memstick
The USB stick is now ready to be used as a boot media just like a CDROM.
Tags: Debian, howto, memory stick, Ubuntu
Posted by Hans-Henry Jakobsen