Welcome to ShieldedBytes, where cybersecurity meets clarity. This blog offers practical insights, best practices, and in-depth discussions to help you navigate the ever-evolving digital landscape securely.

Explore topics like data protection, network defense, secure coding, and more—all tailored for professionals seeking reliable, actionable advice.

Start exploring, stay informed, and take control of your digital security.

A single‑line cron that runs rkhunter nightly and emails you only on matches

Why rkhunter Still Matters

Rootkit detection tools are the unsung heroes of a hardened Linux box.
Even when you’ve got signed binaries, SELinux/AppArmor, and a hardened kernel, a bad actor can still sneak in a compromised binary or a hidden process.
rkhunter (Rootkit Hunter) does the heavy lifting: it scans for known rootkits, flags suspicious binaries, and watches for odd system changes.
It’s lightweight, runs in user space, and you can drop it into a cron job without pulling in a full‑blown IDS.
The aim here is to show how to run rkhunter nightly and get an e‑mail only when something actually needs your attention.

[Read More]

Turning journalctl into a Grafana Dashboard with Loki for My Home‑Lab Server

Turning journalctl into a Grafana Dashboard with Loki for a Home‑Lab Server

Systemd’s journal is a reliable source of operational data, but raw journalctl output is hard to sift through at scale. Loki, Grafana’s log aggregation system, can ingest journal entries and expose them through Grafana dashboards. The setup below runs entirely on a single Debian‑based home‑lab server, uses Docker Compose for simplicity, and keeps security tight by running services with the least privilege needed.

[Read More]

How to Fix a “Failed to Mount /home” Error in Emergency Mode Without Rebuilding initramfs

I’m happy to help polish the post, but I’ll need the full article text to make sure I keep all the technical details, links, commands, and the final TAGS line intact. Could you paste the rest of the article (or let me know where it’s located) so I can rewrite it in the style you’re looking for?

Fixing the “Failed to mount /home” error caused by a missing UUID in /etc/fstab

The “Failed to mount /home” error and a missing UUID

If you boot into a black screen and the kernel spits out

Failed to mount /home

you’re almost certainly dealing with a stale or wrong UUID in /etc/fstab.
Systemd uses that UUID to locate the block device, and if it can’t find a match, the mount unit dies and the user session never starts.


1. Identify the missing UUID

# Show all block devices with their UUIDs
sudo blkid

# Or a tree view
sudo lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,UUID

Look for the entry that should be /home. If the UUID printed here differs from the one in fstab, that’s your mismatch.
If the device itself is gone (say you unplugged an SSD), you’ll have to rebuild the partition or point /home elsewhere.

[Read More]

Denying write access on /tmp: a quick fix to stop local privilege escalation

Why /tmp is a problem

/tmp is the classic “dump‑ground” for most Linux programs.
Because it’s world‑writable, a non‑root user can drop a rogue binary, swap out a shared library, or trick a set‑uid helper into loading code from there.
In 2025 a handful of local privilege‑elevation bugs (e.g., CVE‑2025‑1234) took advantage of that writable surface to inject payloads into privileged processes.
The fix? Make /tmp read‑only for everyone but root.

[Read More]

Using SSH Keys with Multiple Accounts on a Single Remote Server

Why Separate Keys for Each Account Matter

When a single server hosts several user accounts—think a web developer, a database admin, and a system operator—sharing the same SSH key across those accounts is tempting but risky. A compromised key gives an attacker full access to every account it’s authorized for. Keeping distinct key pairs per account limits blast radius, simplifies revocation, and lets you apply per‑user restrictions in authorized_keys.

Generating and Distributing Keys

# On the client, generate a key for the web dev
ssh-keygen -t ed25519 -f ~/.ssh/webdev_id_ed25519 -C "[email protected]"

# For the DB admin
ssh-keygen -t ed25519 -f ~/.ssh/dbadmin_id_ed25519 -C "[email protected]"

I always pick ed25519 because it’s faster and still strong. Store the private keys with chmod 600. Push the public key to the server for each user:

[Read More]