Scripting

Enable secure / https SSL login on mediaWiki 1.13.3

This is how I’ve enabled secure SSL login through https on a mediaWiki 1.13.3 installation. This description might work on other versions of mediaWiki, but that has not been tested. mediWiki doesn’t support SSL login out of the box so a little hack has to be performed. First you need to tell the webserver, in […]

Read More
Scripting

Copy files using tar

This is a oneliner to copy files from current directory to another target directory using tar, preserving file attributes, dates etc. #!/bin/sh fromdir=/path/from todir=/path/to/target echo “cd $fromdir; tar cf – . | (cd $todir; tar xpf -)” cd $fromdir; tar cf – . | (cd $todir; tar xpf -)

Read More
Linux

IP address change notifier script

This is a simple bash script that is run by crontab every 5 minutes on a linux box. It e-mails me the new address when a change of IP address is detected. The script (ipchangemail.sh) #!/bin/bash # Check if IP-address has changed. If a change has occured, mail me the new address # Add the […]

Read More
Linux

Mount a RAID Reconstructor disk image in linux

This post came to life because I had gotten a image file of a 120GB linux ext2 RAID partition that I couldn’t access using Windows software. The partition had been rescued by RAID Reconstructor, a Windows software that can rebuild RAID arrays by combining the disks from the RAID and store it as one image […]

Read More
Misc

Resize a VMWare virtual disk

This post describes how you can resize your VMWare disk in linux using the vmware-vdiskmanager tool, a offline disk manipulation utility. I’ve been using VMWare Workstation version 6.5 on a Ubuntu 8.10 Intrepid Ibex linux installation. Shrink a disk image vmware-vdiskmanager -k diskname.vmdk Expand the disk to the specified capacity vmware-vdiskmanager -x <new-capacity> diskimage.vmdk Example […]

Read More