How to tell to fail2ban what init system are you running

I owed myself a fail2ban installation on the Raspberry Pi. A simple view of this log tell you many things:

Jun 17 07:54:15 raspberrypi systemd[1]: Starting Fail2Ban Service...
Jun 17 07:54:28 raspberrypi fail2ban-client[11687]: ERROR No file(s) found for glob /var/log/proftpd/proftpd.log
Jun 17 07:54:28 raspberrypi fail2ban-client[11687]: ERROR Failed during configuration: Have not found any log file for proftpd jail
Jun 17 07:54:29 raspberrypi systemd[1]: fail2ban.service: Control process exited, code=exited status=255
Jun 17 07:54:29 raspberrypi systemd[1]: Failed to start Fail2Ban Service.
Jun 17 07:54:29 raspberrypi systemd[1]: fail2ban.service: Unit entered failed state.
Jun 17 07:54:29 raspberrypi systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Jun 17 07:54:29 raspberrypi systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Jun 17 07:54:29 raspberrypi systemd[1]: Stopped Fail2Ban Service.
Jun 17 07:54:29 raspberrypi systemd[1]: Starting Fail2Ban Service...

You may notice I’ve tried to start up Fail2ban unsuccesfully. So let’s debug…
It appears an error that informs there’s no proftd.log. The second line points to the same log file, but related with fail2ban configuration (jail, here means fail2ban configuration).

After digging a lit bit I’ve found that fail2ban sets as auto its configuration and try to guess if your system is managed by systemd, traditional systemV init scripts or whatever. I edit the /etc/fail2ban/jail.conf, I set backend = systemd and fail2ban starts up succesfully.

How good it’s philosophy for being a developer?

It’s quite encouraging listening what Chris Lee says about mature people that starts to learn to programming. He says that lawers, philosophy degrees and musicians are logical and detail oriented professionals. Those attributes help them to learn to code and otherwise are skills the newies needs to develop.

You may listen the podcast (go to minute 20 more or less) in https://learntocodewith.me/podcast/fundamentals-first-with-chris-lee/

Chris Lee is running Launch School and he also share more interesting opinons, I agree with him for instance:

  • Mastery, rather than time spent, should be the goal
  • Don’t start by learning the frameworks. Learn from fundamentals and take your time.
  • Target the job you want, and then build something that shows what you’re capable of with that job in mind.

Theme change in WordPress

I’ve been loyal to Sator-ii theme by Felipe Lavín for a very long time.

I don’t get very well re-sharping the theme with menus, now, natively supported in WordPress. Maybe it’s my fault.

So I look around for a theme with three main requirements:

  1. menu support,
  2. as similar to Sator-ii as posible (clean an easy to read)
  3. … and two columns

So here’s RapidOne Lite by Rising Theme.

How do you indetify an USB and get it mounted in your Linux?

I’m using a RaspberryPi to enforce myself to keep learning.

I’ve added an old 8Gb USB stick to the RaspberryPi. The Raspberry runs a very minimal Raspbian Strech Lite without assistants, or graphical interface, not even with the automunt command.

So, how do you identify the USB stick plugged and get it mounted or your Linux?

  1. Plug your USB stick to your RaspberryPi
  2. Run the command blkid as root.
    As an example I type:

    sudo blkid

    … and I get:

    /dev/mmcblk0p1: LABEL="boot" UUID="CDD4-B453" TYPE="vfat" PARTUUID="b1b51741-01"
    /dev/mmcblk0p2: LABEL="rootfs" UUID="72bfc10d-73ec-4d9e-a54a-1cc507ee7ed2" TYPE="ext4" PARTUUID="b1b51741-02"
    /dev/sda: LABEL="USB8GB" UUID="B21F-17E5" TYPE="vfat"
    /dev/mmcblk0: PTUUID="b1b51741" PTTYPE="dos"

    This line identify what device is used by the USB stick just plugged /dev/sda: LABEL="USB8GB" UUID="B21F-17E5" TYPE="vfat"

  3. Now we can mount normally the device by typing:

    sudo mount -t vfat /dev/sda /mnt/

What is the motivation of this post? I’ve to managed myself in order to get mounted the USB stick since the command lsusb gave me a lot of info but no so usefull, or simple, to get it mounted.

Privacy matters, very much.

In Europe a new reglamentation has enforce the privacy guarantees for citizens. I’ve used the default privacy policy page for this blog that WordPress offers.

And as soon as posible I’ll customized it in order to let it clear: I don’t collect any data because I’m very concern about privacy.

Please, privacy matters, you must stop using some software and services that collect all your data. Really.

Note: I suggest as a further reading: https://www.eff.org/deeplinks/2018/01/europes-gdpr-will-force-icann-improve-whois-privacy