<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Open-Source on Linux Security</title><link>https://linuxtransfer.com/tags/open-source/</link><description>Recent content in Open-Source on Linux Security</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 20 Oct 2026 08:55:34 +0200</lastBuildDate><atom:link href="https://linuxtransfer.com/tags/open-source/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Use systemd‑resolved to Serve a Local Search Domain on My Home Network</title><link>https://linuxtransfer.com/post/2026-10-20-how-to-use-systemdresolved-to-serve-a-local-s/</link><pubDate>Tue, 20 Oct 2026 08:55:34 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-10-20-how-to-use-systemdresolved-to-serve-a-local-s/</guid><description>&lt;h2 id="why-a-local-search-domain-matters">Why a Local Search Domain Matters&lt;/h2>
&lt;p>In a home network you often want to reach devices by simple names—&lt;code>printer&lt;/code>, &lt;code>raspberrypi&lt;/code>, &lt;code>nas&lt;/code>—instead of remembering IP addresses. A local search domain lets the resolver append a suffix automatically, turning &lt;code>printer&lt;/code> into &lt;code>printer.home.local&lt;/code>. systemd‑resolved can supply that suffix for the host itself, and, when coupled with a lightweight DNS forwarder, can expose the same domain to all clients.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Item&lt;/th>
 &lt;th>Why it matters&lt;/th>
 &lt;th>Typical command&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>systemd‑resolved enabled&lt;/td>
 &lt;td>It supplies the stub resolver on 127.0.0.53&lt;/td>
 &lt;td>&lt;code>systemctl enable --now systemd-resolved&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>systemd‑networkd or another network manager&lt;/td>
 &lt;td>Needed to push the domain to clients via DHCP&lt;/td>
 &lt;td>&lt;code>systemctl enable --now systemd-networkd&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Optional: dnsmasq or bind&lt;/td>
 &lt;td>To serve the domain to other hosts&lt;/td>
 &lt;td>&lt;code>apt install dnsmasq&lt;/code> (Debian/Ubuntu)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Firewall configured&lt;/td>
 &lt;td>To restrict DNS traffic&lt;/td>
 &lt;td>&lt;code>ufw allow 53&lt;/code> (or &lt;code>firewalld&lt;/code> rules)&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>All examples assume a Debian‑based system; adjust package names for your distro.&lt;/p></description></item><item><title>Stop the “REMOTE HOST IDENTIFICATION HAS CHANGED!” error by cleaning ~/.ssh/known_hosts.</title><link>https://linuxtransfer.com/post/2026-10-15-stop-the-remote-host-identification-has-chang/</link><pubDate>Thu, 15 Oct 2026 09:11:09 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-10-15-stop-the-remote-host-identification-has-chang/</guid><description>&lt;h2 id="why-the-remote-host-identification-has-changed-error-appears">Why the “REMOTE HOST IDENTIFICATION HAS CHANGED!” error appears&lt;/h2>
&lt;p>The message &lt;em>“REMOTE HOST IDENTIFICATION HAS CHANGED!”&lt;/em> shows up every time you try to SSH into a host that reports a different key than the one you stored in &lt;code>~/.ssh/known_hosts&lt;/code>.&lt;br>
It’s a sanity check that protects you from man‑in‑the‑middle attacks, but it can also be a pain when you’re just redeploying a server or spinning up a VM that got a new IP.&lt;/p></description></item><item><title>Fix a Boot Stuck at “Loading initramfs” After Adding an NVMe to Ubuntu 24.04</title><link>https://linuxtransfer.com/post/2026-10-10-fix-a-boot-stuck-at-loading-initramfs-after-a/</link><pubDate>Sat, 10 Oct 2026 11:23:00 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-10-10-fix-a-boot-stuck-at-loading-initramfs-after-a/</guid><description>&lt;h2 id="when-a-new-nvme-sticks-the-boot-can-stall-at-loading-initramfs">When a new NVMe sticks, the boot can stall at “Loading initramfs”&lt;/h2>
&lt;p>Adding a second NVMe drive to an existing Ubuntu 24.04 installation is a quick way to get more storage or carve out a dedicated data partition.&lt;br>
Most of the time the kernel pulls the NVMe driver on its own, but a handful of mis‑configurations can make the system hang in the initramfs shell.&lt;br>
Typical symptoms:&lt;/p>
&lt;ul>
&lt;li>The screen shows “Loading initramfs …” and then stops.&lt;/li>
&lt;li>The prompt switches to a root shell (&lt;code>root@hostname:/#&lt;/code>).&lt;/li>
&lt;li>Nothing else happens until you manually exit or reboot.&lt;/li>
&lt;/ul>
&lt;p>Below is a hands‑on walk‑through of the most common culprits and how to fix them. I’ll assume you have a working Ubuntu 24.04 install and a spare NVMe device that you just plugged in.&lt;/p></description></item><item><title>Fixing “Host key verification failed” After Renaming a Jump Host Server</title><link>https://linuxtransfer.com/post/2026-10-03-fixing-host-key-verification-failed-after-ren/</link><pubDate>Sat, 03 Oct 2026 10:55:03 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-10-03-fixing-host-key-verification-failed-after-ren/</guid><description>&lt;h2 id="the-host-key-verification-failed-error-after-renaming-a-jump-host">The “Host key verification failed” error after renaming a jump host&lt;/h2>
&lt;p>When you rename a jump host (or any SSH‑accessible machine) the client still keeps the old hostname in its &lt;code>~/.ssh/known_hosts&lt;/code>. On the next connection the client pulls the key presented by the renamed host and compares it with the stored key for the old name. The mismatch triggers the classic&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">Host key verification failed.
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>It’s a safety net against man‑in‑the‑middle attacks, but it can be a nuisance when you legitimately change the hostname. Below is a practical, step‑by‑step fix, a few automation tricks, and some security notes I’ve learned after 20 years on the grind.&lt;/p></description></item><item><title>How to Stop a systemd Timer from Failing After a Reboot Due to an Unset $USER Variable</title><link>https://linuxtransfer.com/post/2026-10-02-how-to-stop-a-systemd-timer-from-failing-afte/</link><pubDate>Fri, 02 Oct 2026 08:57:34 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-10-02-how-to-stop-a-systemd-timer-from-failing-afte/</guid><description>&lt;h2 id="why-the-user-variable-matters-for-systemd-timers">Why the &lt;code>$USER&lt;/code> Variable Matters for Systemd Timers&lt;/h2>
&lt;p>Systemd timers are the go‑to replacement for cron on almost every distro. They’re declarative, mesh cleanly with the unit graph, and bring a bunch of goodies—persistent timers, calendar syntax, and dependency handling. The catch? If your timer’s service unit runs a script that relies on &lt;code>$USER&lt;/code>, you’ll see a silent failure after a reboot. Systemd doesn’t set &lt;code>$USER&lt;/code> for system‑wide units; it only populates it for user‑specific units that run in a logged‑in session.&lt;/p></description></item><item><title>Converting a Nested JSON List of Users into a Simple CSV with jq and awk</title><link>https://linuxtransfer.com/post/2026-10-01-converting-a-nested-json-list-of-users-into-a/</link><pubDate>Thu, 01 Oct 2026 08:22:39 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-10-01-converting-a-nested-json-list-of-users-into-a/</guid><description>&lt;p>When a service spits out a JSON blob that contains a list of users, the data is usually nested and has more fields than you actually need. Turning that into a flat CSV is a common thing to do for automation scripts, reporting, or feeding into spreadsheets. The two most reliable command‑line tools for this job are &lt;strong>jq&lt;/strong> (a JSON processor) and &lt;strong>awk&lt;/strong> (a text filter). Together they give you a fast, secure, and scriptable pipeline.&lt;/p></description></item><item><title>Fixing a Failed /boot Mount in Emergency Mode on Ubuntu 24.04 LTS After a Kernel Update</title><link>https://linuxtransfer.com/post/2026-09-28-fixing-a-failedboot-mount-in-emergency-mode-o/</link><pubDate>Mon, 28 Sep 2026 10:51:22 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-28-fixing-a-failedboot-mount-in-emergency-mode-o/</guid><description>&lt;h2 id="why-a-kernel-update-can-drop-you-into-emergency-mode-becauseboot-wont-mount">Why a kernel update can drop you into emergency mode because /boot won’t mount&lt;/h2>
&lt;p>A fresh kernel can change the initramfs or the boot‑loader’s config, and if the loader can’t find the /boot partition the system drops into that classic emergency shell:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">Emergency shell (root=rw) – press Ctrl‑D to continue
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Below is a no‑fluff, hands‑on walk‑through that keeps the commands you need, the trade‑offs, and a few security reminders.&lt;/p>
&lt;hr>
&lt;h3 id="1-inspect-the-emergency-environment">1. Inspect the emergency environment&lt;/h3>
&lt;p>First, make sure the culprit is really the /boot mount. In the emergency shell run:&lt;/p></description></item><item><title>Stopping Bluetooth headphones from disconnecting on GNOME 48: a quick PipeWire tweak</title><link>https://linuxtransfer.com/post/2026-09-24-stopping-bluetooth-headphones-from-disconnect/</link><pubDate>Thu, 24 Sep 2026 08:02:18 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-24-stopping-bluetooth-headphones-from-disconnect/</guid><description>&lt;h2 id="why-bluetooth-headphones-keep-dropping-on-gnome48">Why Bluetooth headphones keep dropping on GNOME 48&lt;/h2>
&lt;p>Bluetooth audio on GNOME 48 is now handled by &lt;strong>PipeWire&lt;/strong> instead of the old PulseAudio stack. The new stack is cleaner, but it also turns on a “low‑power” mode that can make a headset drop after a few minutes of idle time or when you close the laptop lid. The real culprit is usually the kernel’s power‑management for the Bluetooth controller and PipeWire’s default settings.&lt;/p></description></item><item><title>Using systemd‑cgtop to Spot the Service Eating All Your Memory</title><link>https://linuxtransfer.com/post/2026-09-22-using-systemdcgtop-to-spot-the-service-eating/</link><pubDate>Tue, 22 Sep 2026 09:15:25 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-22-using-systemdcgtop-to-spot-the-service-eating/</guid><description>&lt;h2 id="quick-memory-hunt-with-systemdcgtop">Quick Memory Hunt with systemd‑cgtop&lt;/h2>
&lt;p>When a server starts to feel sluggish, most folks jump straight to CPU or disk I/O. Memory is the silent saboteur that slips under the radar until it’s too late. On modern Linux, every service lives in a cgroup, and &lt;a href="https://www.selinuxcomputing.com/man/man1/systemd-cgtop.1/">&lt;code>systemd‑cgtop&lt;/code>&lt;/a> gives you a live, per‑service view of how that cgroup is eating RAM. Unlike &lt;code>top&lt;/code> or &lt;code>ps&lt;/code>, it aggregates the numbers for you, so you can spot the offender in a glance.&lt;/p></description></item><item><title>Pinning the NVIDIA Driver on Ubuntu 24.04 to Avoid Kernel Update Breakage</title><link>https://linuxtransfer.com/post/2026-09-21-pinning-the-nvidia-driver-on-ubuntu2404-to-av/</link><pubDate>Mon, 21 Sep 2026 11:27:10 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-21-pinning-the-nvidia-driver-on-ubuntu2404-to-av/</guid><description>&lt;h2 id="why-pinning-the-nvidia-driver-matters-on-ubuntu2404">Why Pinning the NVIDIA Driver Matters on Ubuntu 24.04&lt;/h2>
&lt;p>Kernel updates are a blessing and a curse. They bring new features, hardware support, and security patches, but they also can break proprietary modules that depend on a specific ABI. The NVIDIA driver is a prime example: a new kernel may require a new driver build, and if you’re running a GPU‑heavy workload or a GPU‑accelerated service, an unexpected reboot or a “module not found” error can be costly.&lt;/p></description></item><item><title>How a Forgotten Search Domain in /etc/resolv.conf Broke Docker Container DNS and How I Restored It</title><link>https://linuxtransfer.com/post/2026-09-20-how-a-forgotten-search-domain-inetcresolvconf/</link><pubDate>Sun, 20 Sep 2026 12:00:36 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-20-how-a-forgotten-search-domain-inetcresolvconf/</guid><description>&lt;p>The first time I noticed the problem, a Docker‑based microservice was silently timing out on every outbound request. The logs were full of “no servers could be reached” errors, but the host machine could resolve the same hostnames without issue. After a quick check of the container’s &lt;code>/etc/resolv.conf&lt;/code>, I saw an odd line: &lt;code>search mydomain.com&lt;/code>. The host’s &lt;code>/etc/resolv.conf&lt;/code> had no such entry. That single missing search domain was the root of the DNS failure inside containers.&lt;/p></description></item><item><title>When systemd‑resolved ignores /etc/hosts after a kernel upgrade: how to fix it</title><link>https://linuxtransfer.com/post/2026-09-16-when-systemdresolved-ignores-etchosts-after-a/</link><pubDate>Wed, 16 Sep 2026 08:49:23 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-16-when-systemdresolved-ignores-etchosts-after-a/</guid><description>&lt;h2 id="why-etchosts-suddenly-stops-being-respected-after-a-kernel-upgrade">Why &lt;code>/etc/hosts&lt;/code> suddenly stops being respected after a kernel upgrade&lt;/h2>
&lt;p>When a kernel upgrade lands, you expect only low‑level changes. In practice, the upgrade can ripple through the entire userland, especially when &lt;code>systemd‑resolved&lt;/code> is involved. A common symptom is that hostname lookups that used to resolve via &lt;code>/etc/hosts&lt;/code> now fall back to DNS or fail entirely. The culprit is often a subtle change in how &lt;code>systemd‑resolved&lt;/code> loads its configuration or how the Name Service Switch (NSS) library consults &lt;code>/etc/hosts&lt;/code>.&lt;/p></description></item><item><title>Adding per‑interface DNS search domains to systemd‑resolved on Ubuntu 24.04</title><link>https://linuxtransfer.com/post/2026-09-15-adding-perinterface-dns-search-domains-to-sys/</link><pubDate>Tue, 15 Sep 2026 09:43:07 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-15-adding-perinterface-dns-search-domains-to-sys/</guid><description>&lt;h2 id="why-perinterface-search-domains-matter">Why per‑interface search domains matter&lt;/h2>
&lt;p>If a box has more than one NIC—like a wired LAN that talks to a corporate DNS and a Wi‑Fi that talks to a public ISP—mixing the two can bite you. A query for &lt;code>server&lt;/code> will be sent to the DNS server of the interface that sent the request, but the search list that the resolver appends is taken from the &lt;em>global&lt;/em> configuration unless you tell it otherwise. That means you can end up asking your public DNS for an internal host or, even worse, leaking internal names to the Internet. Per‑interface search domains keep the resolver tidy and stop accidental leakage.&lt;/p></description></item><item><title>Rebuilding initramfs to exit emergency mode after a kernel update on Ubuntu 24.04</title><link>https://linuxtransfer.com/post/2026-09-13-rebuilding-initramfs-to-exit-emergency-mode-a/</link><pubDate>Sun, 13 Sep 2026 10:39:22 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-13-rebuilding-initramfs-to-exit-emergency-mode-a/</guid><description>&lt;p>Rebuilding the initramfs is the most reliable way to escape an emergency shell after a kernel upgrade that leaves the system stuck in &lt;em>emergency mode&lt;/em>.&lt;br>
The problem usually stems from a mismatch between the running kernel and the modules or hooks that the initramfs contains.&lt;br>
Below is a step‑by‑step guide that covers the common causes, the exact commands you’ll run, and the security‑aware trade‑offs you should keep in mind.&lt;/p>
&lt;hr>
&lt;h2 id="why-emergency-mode-happens-after-a-kernel-update">Why Emergency Mode Happens After a Kernel Update&lt;/h2>
&lt;p>When you install a new kernel on Ubuntu 24.04, GRUB points to the new image, but the initramfs that ships with it must contain:&lt;/p></description></item><item><title>When chmod 2775 Turns Into a Security Hole: Fixing Setgid Misconfigurations on /srv/shared</title><link>https://linuxtransfer.com/post/2026-09-10-when-chmod2775-turns-into-a-security-hole-fix/</link><pubDate>Thu, 10 Sep 2026 10:27:30 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-10-when-chmod2775-turns-into-a-security-hole-fix/</guid><description>&lt;h2 id="understanding-the-2775-permission-set">Understanding the 2775 Permission Set&lt;/h2>
&lt;p>The octal mode &lt;strong>2775&lt;/strong> is the go‑to for giving a directory shared write access while keeping new files in the same group.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>2&lt;/strong> – set‑gid bit: new files inherit the directory’s group.&lt;/li>
&lt;li>&lt;strong>7&lt;/strong> – owner gets &lt;code>rwx&lt;/code>.&lt;/li>
&lt;li>&lt;strong>7&lt;/strong> – group gets &lt;code>rwx&lt;/code>.&lt;/li>
&lt;li>&lt;strong>5&lt;/strong> – others get &lt;code>r-x&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>On a path like &lt;code>/srv/shared&lt;/code> it looks tidy: any member of the group can drop files, and those files stay in the same group for later collaboration. The flip side? Group write is a double‑edged sword. If the group contains people you don’t fully trust, or if the directory is exposed to a wider audience, the set‑gid bit can become a vector for privilege escalation or accidental data exposure.&lt;/p></description></item><item><title>Why Your systemd Service Stays “activating” After a Kernel Upgrade – A Step‑by‑Step Fix​</title><link>https://linuxtransfer.com/post/2026-09-06-why-your-systemd-service-stays-activating-aft/</link><pubDate>Sun, 06 Sep 2026 08:50:12 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-06-why-your-systemd-service-stays-activating-aft/</guid><description>&lt;h2 id="why-a-service-can-stay-activating-after-a-kernel-upgrade">Why a service can stay “activating” after a kernel upgrade&lt;/h2>
&lt;p>When you bump the kernel, systemd does a hard reset of almost everything.&lt;br>
If a unit you depend on never leaves the &lt;em>activating&lt;/em> state, the rest of the boot can stall or the service simply never runs.&lt;br>
The usual suspect is a dependency on a kernel‑provided resource that is missing or delayed after the upgrade.&lt;/p>
&lt;p>Below is a practical checklist that shows how to diagnose the issue, why it happens, and how to fix it without compromising security or stability.&lt;/p></description></item><item><title>Taming the DNS Resolver: Mastering resolvectl for Faster and More Reliable Internet Connections</title><link>https://linuxtransfer.com/post/2026-09-05-taming-the-dns-resolver-mastering-resolvectl-/</link><pubDate>Sat, 05 Sep 2026 11:24:54 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-09-05-taming-the-dns-resolver-mastering-resolvectl-/</guid><description>&lt;h2 id="why-systemdresolved-matters">Why systemd‑resolved matters&lt;/h2>
&lt;p>On most modern distros the DNS stack is no longer a simple &lt;code>/etc/resolv.conf&lt;/code>.&lt;br>
&lt;code>systemd‑resolved&lt;/code> runs in the background, pulls DNS servers from every
interface, does caching, validates with DNSSEC, and even acts as a local
DNS‑over‑TLS (DoT) proxy.&lt;br>
&lt;code>resolvectl&lt;/code> (now &lt;code>systemd-resolve&lt;/code> in newer releases) is the CLI that lets you
look inside this stack and tweak it without hunting through config files.&lt;/p>
&lt;p>If you run a home lab, self‑hosted services, or just want a snappier, more
reliable lookup, mastering &lt;code>resolvectl&lt;/code> can shave milliseconds off each
query and give you a clear view of what the resolver is actually doing.&lt;/p></description></item></channel></rss>