Auto create home dirs with Samba 20 Oct 2009

If you’re using Samba to provide network shares to your users, it might be usefull to autmatically create the their homedir when they access it the first time. This can be done by adding this line to the [homes] directive :

root preexec = /usr/local/sbin/mkhomedir.sh %U

This is the mkhomedir.sh script itself :

#!/bin/bash

if [ ! -e /storage_users/DOMAIN/$1 ]; then
mkdir /storage_users/DOMAIN/$1
chown $1:"DOMAIN+Domain Admins" /storage_users/DOMAIN/$1
fi
exit 0
Thesis : anti spam by MTA selection 5 Oct 2009

I’m publishing the Thesis that I and my fellow student Joost Ringoot made for our Graduate training in evening school. It might be useful to someone.

Projectwerk_2008_AntiSpam

Slow DNS resolving 22 Sep 2009

The other day one of our internal DNS needed to be shut down for maintenance. During that time people complained about slow responsiveness of the applications running on our RHEL machines. Because the DNS maintenance was the only change we made at that time we started looking in that direction.

As it turned out, it seems that Linux is trying to contact the first DNS server in the resolv.conf file for every DNS query. The second one is queried after x number of seconds

...
Keep VPN Connection alive 7 Aug 2009

Recently i had a VPN connection with OpenSwan that didn’t stay alive. Adding the following option to the config fixed it

dpdaction=restart
Wordpress on LightTPD 2 Aug 2009

I’m running this blog on LightTPD now. It runs a lot faster now on my 64MB VPS.

64MB VPS 28 Jul 2009

I switched from Typo to Wordpress . I thought it would run a little faster on the 64MB VPS  i use on my server. But WP uses MySQL as a backend and that doesn’t really help.

Apache is also quite a memory hog on systems with low memory, but with some Apache and MySQL tuning my blog isn’t going OOM anymore :).

...
Typo with Phusion Passenger 22 Jul 2009

I’m running this blog now with the Phusion Passenger mod for Apache.

Normally this Apache directive should be enough to start your rails app.

VirtualHost *:80;
servername mydomain.tld
documentroot /var/www/html/typo/public
/VirtualHost&gt;</pre>

I had to change it to the following though to get it to work.

VirtualHost *:80;
servername mydomain.tld
PassengerEnabled on
documentroot /var/www/html/typo/public
/VirtualHost
An item with the same key has already been added 8 Jul 2009

When you try to export a virtual machine and get the following error : "An item with the same key has already been added’. There is probably a snapshot attached to the Virtual Machine.

You can’t export the VM with snapshots you’ve got to remove them first.

Installing Fedora 11 13 Jun 2009

During the installation of Fedora 11 on my laptop, the installation process did a suggestion for a hostname.

I swear i didn’t enter anything myself …

VMWare vSphere 24 May 2009