Passed EX415 Linux Security

The exam was 4 hour long. I managed to finish all questions in 3 hours. Fortunately, I found a mistake in the last hour. I think the EX415 exam wasn’t too difficult and pretty confident that I did well. The most difficult part: not knowing what I did wrong. Or how the marker scripts would like to see our answers. I suspected there was a mistake in a question, but who to ask since there is a NDA?...

September 10, 2020 · 1 min · 185 words · kenno

Pairing Bluetooth Mouse on Command Line

Ever since I’ve switched from Gnome to DWM on my main laptop, I have to perform most things on command line now. I know, right? :P Anyway, I need to pair a bluetooth mouse, Logi MX Anywhere 2S, with this Fedora laptop. I had a similar post a while back about connecting Bose QC35 to Fedora 29. So this is quite similar to that post. First, ensure that bluetooth.service is running:...

September 9, 2020 · 2 min · 323 words · kenno

Pfl Provides whatprovides on Gentoo

On Fedora or CentOS, on way to find out what package providing a file we can use yum whatprovides [FILENAME] or dnf whatprovides [FILENAME] on a DNF-aware system. # dnf whatprovides tmux Last metadata expiration check: 2:33:06 ago on Wed 09 Sep 2020 09:45:07 PM AEST. tmux-3.0a-2.fc32.x86_64 : A terminal multiplexer Repo : @System Matched from: Provide : tmux = 3.0a-2.fc32 tmux-3.0a-2.fc32.x86_64 : A terminal multiplexer Repo : fedora Matched from: Provide : tmux = 3....

September 4, 2020 · 2 min · 316 words · kenno

Locking Package Version with DNF Versionlock

While newer version of a package on Linux system is generally a good thing, and we should upgrade it, there is times when we should hold on to the older version. For instance, Fedora 32 just released a newer version of the kernel package 5.8.4 recently, and with this version, the zfs module, version 0.8.4, can’t be built. Therefore, if your Fedora system uses ZFS, like some of my machines, you’ll end up not seeing any ZFS dataset or pools....

August 30, 2020 · 3 min · 490 words · kenno

How to Enable Persistent Logging for Systemd Journal

On RHEL 7/8, CentOS 7/8 and even Ubuntu (??), by default the journal log data is stored only in memory (/run/log/journal/ directory). There are 2 ways to retain the journal log messages. The first one is to set the variable Storage to persistent in the /etc/systemd/journald.conf. [Journal] Storage=persistent Then restart the systemd-journald service. Another solution is simpler and it looks like it’s the recommended way of achieving this. All we have to do is to create a directory, /var/log/journal (with correct ownership and permission), and journald will automatically store the log messages there....

August 29, 2020 · 2 min · 418 words · kenno

Thunderbolt Firmware for ThinkPad X1 Carbon 6 1.20

A quick note to remind ThinkPad X1 Carbon 6 users that Lenovo just released a new firmware for the Thunderbolt on this laptop. And, it’s available via fwupd if you run Fedora (possibly also available on Ubuntu). [root@benji ~]# fwupdmgr update • Thunderbolt Controller has the latest available firmware version Upgrade available for Embedded Controller from 0.1.20 to 0.1.21 20KHCTO1WW must remain plugged into a power source for the duration of the update to avoid damage....

August 13, 2020 · 1 min · 140 words · kenno

SELinux Error ValueError: Port already Defined

Today, I want to run the httpd server on a custom port, 8002 on a CentOS 7 server. Of course, all my system has SELinux in enforcing mode. In order for the httpd to bind on port 8002, we need to add this port to the httpd_port_t port type list. First let’s confirm that port 8002 is not yet in the http_port_t list: [root@servera ~]# semanage port -l | grep ^http http_cache_port_t tcp 8080, 8118, 8123, 10001-10010 http_cache_port_t udp 3130 http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000 We know from the manual semanage-port(8), to add a port to an SELinux port type list, we run the following command:...

July 27, 2020 · 2 min · 359 words · kenno

BIOS Firmware for ThinkPad P1 Gen1 1.31

It seems like Lenovo releases a new BIOS firmeware every month for its ThinkPad, at least for the ThinkPad P1 Gen1. On July 21, the BIOS firmware version 1.31 was released. CHANGES IN THIS RELEASE Version 1.31 [Important updates] - Address CVE-2020-0548, (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0548) - Address CVE-2020-0549, (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0549) - Address CVE-2020-0543, (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0543) [New functions or enhancements] - Updated the CPU microcode. [Problem fixes] - Fixed an issue where Force PXE boot by Intel AMT did not work....

July 27, 2020 · 2 min · 300 words · kenno

How to Change Private Key Passphrase

To change the passphrase on your default RSA key: ➜ ssh-keygen -p Enter file in which the key is (/home/kenno/.ssh/id_rsa): Enter new passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved with the new passphrase. Note that if you have more a different key, you can either supply it at the “Enter file in which key is” prompt or provide this file to the ssh-keygen argument with the -f option....

July 20, 2020 · 1 min · 134 words · kenno

Changing LUKS Passphrase

In my previous blog post, Managing File System Encryption with LUKS, I showed how to create an encrypted partition (of disk) using LUKS. Today, I’d like to show you how we can change the passphrase on this LUKS encrypted partition and keeping this passphrase (key) in the same slot. While I’m writing this blog post, I cannot remember how to do this, and I’m going to try to figure this out without doing the Google search....

July 12, 2020 · 7 min · 1319 words · kenno