Skip to content

Author: halfgaar

http://www.halfgaar.net/

Halfgaar is Wiebe. Wiebe is a contributing author on this weblog. He also has a lot of stuff (such as long, in-depth articles) on his personal website.

Wiebe works at YTEC, where he is a senior developer of customer-specific tailor-made software (“klantspecifieke maatwerk software“) for clients in a few select markets: wholesale, printing and healthcare.

Executing system commands from PHP with SUID executable.

If you want to execute system commands from something like PHP, you need a SUID executable which you can call from your PHP scripts. This is such a script. It could be extended to support parameters for the commands you want to execute, but that would be an enormous security risk, because then anybody can execute any command. If you need something as flexible as that, you need to think about adding some kind of security restrictions, like a list of allowed commands. Read More »

Configuring a Power DNS superslave server

Power DNS, as opposed to Bind, has the option to be a superslave. This means that it will initiate any zone transfer from trusted hosts, avoiding the need to configure each zone on both master and slave. Read More »

Roos Roos Loon installation and configuration weirdness

Because Roos Roos Loon has always been an application that stored its data files in the program files directory, special measures had to be taken to make sure the data files are backed up. I wanted them on a network drive. To that end, I always installed the entire program on a network drive. Read More »

Finding junction files in Windows 7 and exclude them with DeltaCopy

Windows 7 has a sort of hard link, a junction file, which it uses to link the old location "Documents and Settings" to /Users/. Because of all this junctioning, you can't just copy files with a Cygwin program like Deltacopy, because it will hang in infinite loop and copy a whole lot of things twice. Read More »

Bash script template

A template bash script, for when you need something overengineerd that works. Read More »

Bash parameter parsing

Here is a code snippet I use for parameter parsing: dohelp() { echo "Example script" echo "" Read More »

Allowing apache to set Nagios cmd file

On debian, to prevent: Error: Could not stat() command file ‘/var/lib/nagios3/rw/nagios.cmd’! Read More »

Making a service available on more ports with iptables

If you need services to be availble on multiple ports, you can use: iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 1000 -j REDIRECT --to-port 25 --match comment --comment "Explain." Read More »

Setting up pptpd and pptp for a VPN

source and source and source. I'm keeping it as simple as possible. Read More »

Making a Compaq Deskpro sff boot without keyboard

To boot a compaq Deskpro sff without keyboard, you need to configure the BIOS in a special way. I found this: Read More »