six demon bag

Wind, fire, all that kind of thing!


Generate a Solr Password Hash With a Shell Script

In 2017 I published a small Java utility for generating Solr password hashes, because I didn't like launching Solr with well-known credentials. I would've preferred doing it with just a shell script, but found myself unable to replicate the hash creation process with sha256sum.

A couple days ago user rmalchow contacted me on Github with a solution for that, which I want to share here.

See more ...

Posted 15:28 [permalink]


Registration Blocker 1.5.0 released

Due to popular demand I added an option to whitelist domains instead of the default blacklist mode to the Registration Blocker plugin for Question2Answer. Enjoy.

Download: Version 1.5.0

Posted 14:12 [permalink]


Registration Blocker 1.4.0 released

A short while ago I forked the Registration Blocker plugin for Question2Answer, since it apparently has been abandoned by the original developer, and I needed some additional features.

Today I'm releasing my updated version of the plugin, which adds the following features:

See more ...

Posted 20:10 [permalink]


How SJWs affected Stack Overflow

Earlier this year user AnonyMousse did an analysis of how the answer rate on Stack Overflow developed over time. This was prompted by the exodus of many high profile users after the social justice influenced changes to their Code of Conduct in late 2019.

See more ...

Posted 13:13 [permalink]


Barracuda Backup Agent for Linux Unattended Installation (Update)

This is a brief update to my previous post Barracuda Backup Agent for Linux Unattended Installation. In recent versions the name of the actual installer binary has changed to UiConsole. The problem and solution remain the same, though.

Download and unpack the archive, then run

echo '/opt/barracuda' | ./lin/$(uname -m)/UiConsole

to install the agent to a different directory. To uninstall run

echo 'u' | ./lin/$(uname -m)/UiConsole

Note that uninstallation leaves an auto-generated SSL certificate in the directory <installdir>/config, so you need to clean up manually afterwards. Also, the public download location for the agents has apparently been removed. Now you need to download the agent from the Cloud Control web UI (System → Software-Downloads).

Posted 21:32 [permalink]


Installing Discourse on Devuan

Before deciding on setting up my Q&A site with Question2Answer I evaluated several programs, one of them being Discourse. And even though I ultimately decided against Discourse (because the setup was too complex and it doesn't have all the features I wanted) I don't want my experiences go to waste, so I'll publish them here.

See more ...

Posted 19:57 [permalink]


Content Security Policy for Question2Answer

The trickiest part of setting up my Q&A site (running on Question2Answer) was getting the content security policy right. I started with this basic policy:

default-src 'self';
script-src 'self';
style-src 'self';
img-src *;
object-src: 'none';
form-action: 'self';
frame-ancestors: 'self';

but quickly realized that it prevented some page elements from showing.

See more ...

Posted 13:16 [permalink]


My Own Q&A Site

At long last I've set up my own Q&A site. If you want to ask a scripting or system administration question, or need support for the stuff I cobbled together, feel free to ask there.

Since the available themes sort of looked like somebody threw random paintballs at them, I made my own. If you're interested you can download it from Github or here.

Posted 12:46 [permalink]


Disable Firefox 77 Address Bar Popout

*sigh* Another day, another Firefox fuckup. One of the more annoying new "features" in recent Firefox versions is the address bar jumping at you when it gets the focus. In Firefox 75 that misbehavior could be corrected with a couple adjustments in about:config:

browser.urlbar.openViewOnFocus false
browser.urlbar.update1 false
browser.urlbar.update1.interventions false
browser.urlbar.update1.searchTips false

However, with Firefox 77 those settings don't work anymore (you can reset/delete them). Because who would ever want to disable what Mozilla developers in their infinite wisdom decided that you must like?

See more ...

Posted 12:42 [permalink]


Privacy-friendly Logging With Nginx

IP addresses are considered personal information, so your web server is not supposed to log them, at least not in a way that would allow tracing the address back to a person. The usual way to comply with this requirement is to mask part of the visitor's IP address, e.g. → (IPv4) or fd22:e03e:f88a:ea84::42 → fd22:e03e:: (IPv6).

See more ...

Posted 15:27 [permalink]


Shell Patterns (5) - Locking

This is a short series describing some Bash constructs that I frequently use in my scripts.

Sometimes you need to ensure that a script is doing an operation exclusively, to avoid race conditions in case it had been launched several times in parallel. This kind of concurrency control is called mutual exclusion, or mutex for short. In Bash a mutex can be implemented by terminating or suspending execution unless the script is able to create a lock file.

See more ...

Posted 15:33 [permalink]

Barracuda Backup Reports Missing Drive

Barracuda Backup reports show a warning when the Windows agent cannot find a drive that is supposed to be backed up:

A Volume (drive) that was previously backed up is no longer there and being backed up.: Removing volume X: because it no longer exists.

The vendor documentation has an article that describes how to bring the missing drive back online. But what if the drive was removed on purpose and people just forgot to adjust the backup configuration first? You can't simply change the backup configuration to ignore the drive after the fact, since the drive is already absent and thus cannot be de-selected.

See more ...

Posted 11:05 [permalink]


Shell Patterns (4) - Limiting Execution Time

This is a short series describing some Bash constructs that I frequently use in my scripts.

Sometimes you want a script to give up on what it's trying to do after some period of time. The simplest way for limiting the time a given statement may take for execution is the timeout command.

$ timout 2 ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from icmp_seq=2 ttl=64 time=0.012 ms
$ echo $?

However, timeout is only useful for limiting the execution time of a single (blocking) command. Consider for instance a situation where you deployed a VM or an LXD container, and need to wait for cloud-init to complete on that system. Or a situation where you sent an asynchronous request to a REST API. timeout won't help you there. You need to poll the system or API repeatedly until the respective "operation completed" indicator appears.

See more ...

Posted 22:35 [permalink]


FRITZ!Box Firewall is Broken

AVM's FRITZ!Box routers have builtin packet filtering capabilities that are configured via the parental controls. However, for some unknown reason the vendor deemed it a good idea to hard-link MAC addresses to IPs (hint: it's not) with no option to override it (hint #2: that's an even worse idea).

See more ...

Posted 16:06 [permalink]

Shell Patterns (3) - Structured Output

This is a short series describing some Bash constructs that I frequently use in my scripts.

On Linux (and many other operating systems) it's common to have regular and error output written to stdout and stderr respectively. In shell scripts you'd use the echo or printf commands for displaying messages, and redirect stdout to stderr for having the message displayed on stderr.

echo 'foo'       # output goes to stdout
echo 'bar' 1>&2  # output goes to stderr

There may be different levels of information that you want to separate from each other, though, like having additional debug output that you don't want to pollute stdout or stderr. For that you can use the file descriptors 3 through 9.

See more ...

Posted 15:22 [permalink]


Shell Patterns (2) - Error Handling

This is a short series describing some Bash constructs that I frequently use in my scripts.

When writing scripts for automation purposes you normally want the scripts to terminate when something goes wrong. Because terminating in a controlled way is usually better than blindly continuing execution when the assumptions subsequent commands are based on aren't valid anymore.

Bash provides several options for controlling error handling, the most commonly used ones being

  • -e (or -o errexit): Exit immediately when a command terminates with a non-zero exit code.
  • -u (or -o nounset): Treat unset variables and parameters (except for $@ and $*) as errors when expanding them. This prevents problems due to misspelled variables.

There are some issues with using just these two options, though:

See more ...

Posted 17:25 [permalink]


Non-interactive MongoDB Commandline

MongoDB provides an interactive command shell for working with the database. Which is all nice and dandy, but from an admin and automation perspective it's desirable to also be able to run commands non-interactively. The mongo commandline tool does have a parameter --eval that kind of allows you to do that:

--eval <javascript>
Evaluates a JavaScript expression that is specified as an argument. mongo does not load its own environment when evaluating code. As a result many options of the shell environment are not available.

except that it doesn't play nice when you also want to automatically authenticate via the config file .mongorc.js.

See more ...

Posted 01:29 [permalink]


Shell Patterns (1) - Logging

This is a short series describing some Bash constructs that I frequently use in my scripts.

What do you do when you run fully automated scripts in the background, but still want to keep track of what they're doing and, more importantly, when something goes wrong? The answer is, of course, you log what the script is doing (or is about to do).

There are two commonly used ways of implementing logging in Bash scripts:

Personally, I prefer the latter, since it allows not only for managing log files independently of the process creating the log output, but also for filtering log data and/or forwarding it to a central loghost.

See more ...

Posted 20:47 [permalink]


Social Justice Overflow

When the statement about my stance on neopronouns was deleted from my Stack Exchange profiles for the first time I posted a question on Meta Stack Exchange asking for the reason of the deletion (since none had been given). In the same question I also documented the abysmal (lack of) responses from both moderators and corporate SE.

This question has now been deleted (on Christmas day no less). Apparently some SJWs don't like being reminded of their own bigotry.

But of course I am willing (and capable) of preserving the question for posteriority. Screenshot below. Click on the image to go to the deleted question on Meta SE (requires 10k+ reputation).

See more ...

Posted 04:39 [permalink]


Good Riddance Stack Overflow

A while ago Stack Overflow updated their Code of Conduct to mandate the use of user-specified pronouns. To which I had this to say:

Should I ever get suspended over something stupid like using the "wrong" pronoun nobody needs to bother re-enabling my account. I will be gone permanently.

I don't have a problem using gender-neutral language. However, I will not look up someone's "pronoun du jour" just so that I may address them "correctly", and I absolutely refuse to use "neopronouns". How anyone can look at this and not realize the lunacy in it is beyond me. The attempt to enforce the use of made-up pronouns has nothing to do with being inclusive or respectful. It's a power-trip for some social justice warriors that doesn't have any merits at all, and it will be weaponized.

These neopronoun shenanigans are pure unbridled insanity, and future generations will look back and ask "What on Earth were they thinking?"

Today my Meta Stack Exchange account got suspended over my stance on the use of neopronouns. In addition to that the statement cited above was removed from all of my network profiles for the second time, in direct contradiction to what used to be the policy (at least as far as I'm aware).

So, as promised, I'm terminating all of my activity on Stack Overflow and all other Stack Exchange network sites effective immediately. Stack Overflow (the company) seems to be of the mind that they can survive on questions and social justice alone these days. I guess we'll find out how well that's going to work for them.


Posted 17:56 [permalink]