# Category: Technology

## Using tcpdump to create files readable by Wireshark

Source. tcpdump -l -n -i eth0 -w dump.pcap -s 65535 host www.example.com and port 80 Read More »

## Often used Eagle parts and packages

Everytime I work with Eagle, I need to dig deep to remember which libraries and packages I used. Here's a memory aid: Read More »

## Testing an OpenSSL connection

Simple command to test an SSL connection: openssl s_client -connect meel.halfgaar.net:993 -ssl3 Read More »

## Ubuntu 10.10 with kernel 2.6.35-25 shutdown problem as Xen DomU

The current kernel in Ubuntu Maverick has a problem with shutting down when running as a Xen DomU (guest). When the VM has more than 1 VCPU, it won't reboot or shutdown. Read More »

## Adding a disk to a RAID5 array on a 3Ware array with tw_cli

I wanted to know if I could extend the size of a RAID5 array on the 3Ware 9650SE, so I tried something. Read More »

## Create a remote repository and branch with bzr

Create a shared remote bzr repository: bzr init-repo --no-trees sftp://development@server.example.com/srv/bzr/project/ bzr init sftp://development@server.example.com/srv/bzr/project/trunk bzr co sftp://development@server.example.com/srv/bzr/project/trunk project Read More »

## Ubuntu Desktop Linux and Acer TravelMate 7513WSMi

My youngest sister has retired her big-ass (17") Acer TravelMate (model 7513WSMi 7510) with a more modern offering from Sony. That was last year. Now, she thought it'd be a good idea to donate it to our oldest sister. But since the thing has always “run” like a pig with Windows Vista, her girl-geek instincts thought it better if I'd equip the old monster with Ubuntu Linux instead. Read More »

## Making a shell-script run with setuid root

If you want to run a process with root privileges that you can invoke as a less unprivileged user, you can make the program setuid root. This can be very useful, for example, when you want a PHP or CGI script to call a backup process, or to create a new site or irrevocably delete you whole system. The latter example points to a serious security problem: if anyone can figure out a way to make your program do something you don't want, you're screwed, because you just gave them root privileges to wreak maximum havoc. That's why, normally, scripts (anything executed by an interpreter by the kernel because of a shebang) won't get elevated privileges when you set their setuid bit. Read More »

## 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 »