Categories

Links

License

Creative Commons License

Unless otherwise expressly stated, all original material of whatever nature created by and included in this weblog is licensed under a Creative Commons License.

24.05.2020

rkhunter CRLF confusion

On my Linux hosts I'm running rkhunter. On a newly configured host it lately reported the following warning:

Warning: The SSH and rkhunter configuration options should be the same:
        SSH configuration option 'PermitRootLogin': no
	Rkhunter configuration option 'ALLOW_SSH_ROOT_USER': no

On first sight the warning does not seem to make much sense, as both configuration options seem to be set to the same value (no).
But digging further reveals that they are stored slightly different:

# file /etc/rkhunter.conf
/etc/rkhunter.conf: ASCII text
# file /etc/ssh/sshd_config
/etc/ssh/sshd_config: ASCII text, with CRLF line terminators

Turns out that rkhunter is also checking the line terminators as part of the configuration values, and warns because they are different.

Knowing this, the fix is simple: run dos2unix on the CRLF file

11:22 | Linux | Permalink

21.05.2020

ipaddr CLI tool

While doing some maintenance on my server, I got tired of searching through the output of ip addr show to find the IP addresses configured on the interfaces.
Thus I wrote a simple CLI tool to display the information I needed in a concise and human friendly form: ipaddr

$ ipaddr
lo          127.0.0.1/8
ens5        198.51.100.160/24
tun24008    10.123.199.78/32
tun71991639 10.200.123.5/32
tun26724    10.100.100.235/32
tun3883710  10.123.111.7/32

A nice side-effect of writing this in Go is that it works out-of-the-box also on non-Linux systems :-)

19:38 | Networking | Permalink

18.04.2020

Poor man's reboot notification

Sometimes you need to be notified about reboots of a machine without having the luxury of a proper monitoring system.

The following crontab entry triggers an e-mail when the host has been rebooted in the last 5 minutes.

*/5 * * * * [ $(sed -e 's/\..*//' /proc/uptime) -lt 540 ] && echo "Host has been rebooted! Uptime: $(uptime)"

15:03 | Linux | Permalink

12.04.2020

Cottage cheese Avocado Crostini

Inspired by this recipe, I made some yummy Crostini using Cottage cheese (instead of Ricotta cheese) and Avocado with some drops of Aceto balsamico.

Cottage cheese Avocado Crostini

19:16 | Food | Permalink

28.03.2020

Ein Lied für Jetzt

08:53 | Music | Permalink

21.03.2020

ip_compact and ip_diff

Somehow I always end up working with lists of IP networks and needing to minimize and compare them.

Some of my Perl scripts for this might still be hidden in a corporate source repository, and somewhere in the backups of my old Linux laptop should be even earlier attempts in Bash.

Both of them are not very useful to me where they are, thus I've written yet another version.
This time in Go using the ipaddr package.

Say hello to ip_compact and ip_diff :-)

15:18 | Networking | Permalink

17.03.2020

#StayTheFuckHome

Stay The Fuck Home!

19:33 | Music | Permalink

20.12.2019

This Page is Designed to Last

This Page is Designed to Last — a manifesto from Jeff Huang for preserving content on the web, where he advocates to keep content on the web available and pledges to keep his site available for the next 10 years.

Having my content in this weblog online since 2002, I can very much relate to this initiative and additionally would like to point to the efforts of archive.org (aka. The Internet Archive).
The wayback machine of archive.org allows to see old versions of websites, even when the website itself is no longer available.

For me personally this became critically useful when the database of my weblog vanished with no current backup and I then used the archived versions from archive.org to restore the missing content.

Thus I would like to encourage everyone to support the efforts of archive.org with a donation.

09:56 | Misc | Permalink

02.11.2019

The Comet Is Coming

The Comet Is Coming is a 21st century style Jazz band.
Discovered at the Jazznojazz festival :-)

11:04 | Music | Permalink

25.05.2019

More productive Git

More productive Git — a short article from James Turnbull with 'Tips for acquiring Git super powers'.

TL;DR:

  • git reset <filename>
  • git cherry-pick <commitid>
  • git commit --amend
  • git stash
  • git log --stat
  • git bisect

07:47 | Coding | Permalink