Category Archives: Linux

Stuff about the superior OS

Understanding mcelog ECC errors – Which stick of RAM is broken?

Before reading this, please note that much of the information in mcelog is hardware dependent. Your mileage may vary. Memory gone bad So one of the servers, running an X99-WS/IPMI board from Asus, began putting errors into /var/log/mcelog. Thankfully, they were all the same, telling me the following: mcelog: failed to prefill DIMM database from […]

Finding duplicate files with Bash

Someone recently asked, in #bash on Freenode, how to find duplicate files with Bash. Several options were suggested, and the user ended up installing and running “fdupes“. However, this sort of thing should be reasonably easy to do using “find” and a few pipes. As a quick overview, what you want to achieve is to […]

Killing a process tree, killing a PID and all children

Here are a couple of useful functions I wrote to kill a process tree. It’s useful when dealing with tcpserver, which refuses to disconnect a client for as long as a process it started, or a child of that process, still runs. It’s also good for tackling runaway unintentional fork bombs, rogue daemons and other […]

Making a telnet server with Bash and tcpserver

Telnet servers are everywhere. They are simple, insecure by nature, outdated, and often badly implemented. Let’s do that, shall we? 🙂 TL;DR: Here’s the library. A simple way to make any command line interface listen to incoming TCP connections is tcpserver, provided as part of the ucspi-tcp or ucspi-tcp-ipv6 package on Debian. Using this, we […]

apt-get reports Packages not found

So.. this shit again. # apt-get update Ign http://ftp.debian.org jessie-updates InRelease Ign http://ftp.debian.org jessie-updates Release.gpg Ign http://ftp.debian.org jessie-updates Release Ign http://ftp.debian.org jessie-updates/main Sources/DiffIndex Ign http://ftp.debian.org jessie-updates/main i386 Packages/DiffIndex Ign http://ftp.no.debian.org jessie InRelease Ign http://ftp.no.debian.org jessie Release.gpg Ign http://ftp.no.debian.org jessie Release Ign http://ftp.no.debian.org jessie/main Sources/DiffIndex Ign http://ftp.no.debian.org jessie/main i386 Packages/DiffIndex Ign http://security.debian.org jessie/updates InRelease Ign http://security.debian.org […]

Duplicate bind mounts with chroots on systemd

When setting up jails, I commonly end up with structures like this in my /etc/fstab: /dev /jail/test/dev auto bind 0 0 /dev/pts /jail/test/dev/pts auto bind 0 0 /dev/shm /jail/test/dev/shm auto bind 0 0 /proc /jail/test/proc auto bind 0 0 /sys /jail/test/sys auto bind 0 0 /dev /jail/test2/dev auto bind 0 0 /dev/pts /jail/test2/dev/pts auto bind […]

W: [pulseaudio] authkey.c: Failed to open cookie file ‘/home/user/.config/pulse/cookie’: No such file or directory

W: [pulseaudio] authkey.c: Failed to open cookie file ‘/home/user/.config/pulse/cookie’: No such file or directory W: [pulseaudio] authkey.c: Failed to load authorization key ‘/home/user/.config/pulse/cookie’: No such file or directory I had this problem on an embedded box, with no X11, or even a screen. Turns out that at least some versions of Debian have an issue […]

My tweaks to Kali Linux (note to self)

Here are some of the things I did to make Kali Linux 2016.1 suit my taste, mostly intended as a note to myself, but posted here in case it helps anyone else. General checklist Install aptitude and update everything Add settings icon to left panel Enable mouse tap to click in “Settings => Mouse & […]