Featured »

September 9, 2021 – 11:28 am

Cron is an indispensable tool for system administration. The difficulties in working with cron in a large environment stem from its decentralized nature. Cron jobs multiply like rabbits, and keeping track of them is not …

Read the full story »

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.


Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.


Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.


Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Archive by Category

Articles in Data

Generating Random Text Files for Testing

September 16, 2021 – 11:31 am

Sometimes you need dummy folder structures populated with random data for testing your various scripts and processes – backups, file transfers, encryption, compression, etc. Every time I need something like this, I end up writing …

Renaming Files with exiftool

September 2, 2021 – 11:25 am

Recently I exported a whole bunch of files from Lightroom to a NAS share and filenames like 2E570434-67B7E0489CA2-39354-000017CF24DD8ACD.jpg are not very informative. It would’ve been nice if the filename contained some useful information like date, …

Fixing Sudo

January 28, 2021 – 11:53 am

A decade-old massive and easy-to-exploit security hole (CVE-2021-3156) has been found in sudo allowing for full root access by any unprivileged system user. This is one of those rare security bugs you can’t delay remediating.

Bulk Create Linux Users using Salt

October 9, 2020 – 1:48 pm

Recently I ran into a situation where hundreds of VMs recently built via OpenShift/Ansible automation were missing an important local user account used for security audits. While our automation guys were working on tracking down …

Checking Linux Account Password

October 8, 2020 – 1:46 pm

On occasion you may need to check if an account has a specific password. For example, when you build VMs, you may use some default passwords for some default accounts (i.e. root) that should be …

Updating Lynis

October 6, 2020 – 8:22 am

Lynis is an excellent security audit tool for Linux and various Unix derivatives. I have a small wrapper script that runs Lynis via a cron job, does a selective diff with the previous run’s output, …

Hiding Passwords

October 5, 2020 – 8:20 am

I’ve touched on this subject previously, but suddenly felt I should repeat myself. The big issue with using passwords from command line is shell history.

Backup Options for Raspberry Pi

October 3, 2020 – 8:16 am

Just about every Raspberry Pi I used suffered the same fate: the micro SD card died. It is generally accepted that the expected lifespan of an SD card is around ten years of normal use.

Backing Up WSL Images

October 1, 2020 – 8:13 am

Microsoft’s WSL is interesting. I’d go as far as to say that I like it. The mistake here would be to forget that your Linux image is running under Windows, with everything this entails. Making …

Home-Brew Ransomware Defense

October 1, 2020 – 8:10 am

The first well-known case of ransomware was documented in 1989. The so-called AIDS Trojan was delivered on a floppy disc; encrypted data; demanded $189.00 (nearly four hundred bucks in today’s money) as a “license fee”. …

Appending Filenames

December 22, 2019 – 9:51 pm

If you google how to append, say, current timestamp to the filename in Bash, almost every suggestion boils down to something really basic along the lines of mv $somefile $somefile_$(date +’Y%-%m-%d’). Technically, this is correct …

Bulk-Adding IPTables Rules

December 12, 2019 – 9:46 pm

I’ve been using my mod of this handy script to block countries with iptables. One issue with the script is that it is adding rules one-by-one using the iptables -A syntax. This is the proper …

Windows 10 Upgrades

December 6, 2019 – 9:44 pm

I did the only sensible thing and disabled automatic updates on my two Windows 10 laptops. Microsoft’s belated foray into the world of CI/CD for releasing Windows patches suffers from limited automated testing.

Working with iptables Logging

November 30, 2019 – 9:41 pm

Most commonly iptables is used to allow, block, or redirect connections. However, it also has a logging feature that can be very useful for network traffic analysis and system security.

Copying File Attributes Across Servers

November 29, 2019 – 9:40 pm

To make long story short, had to fix someone’s chmod -R 777 /. A late-night copy-paste fail, it would seem. Needless to say, console access is required, as SSH will not work with permissions on …

CD/DVD-to-ISO Helper Script

November 27, 2019 – 9:39 pm

I can’t recall the last time I needed to convert a CD to ISO. I have four laptops and not one even has a DVD drive. It took me a while to find an external …

Copying Data in a Restricted Environment

August 17, 2019 – 8:04 pm

Consider this not-so-hypothetical scenario: you have some data on server_a that you would like to copy to server_b. Unfortunately, these two servers cannot communicate with each other. Nor do they have access to any common …

Sending Windows Logs to Remote Syslog

July 6, 2019 – 11:21 am

Nothing fancy here: just a quick note on directing Windows event logs and select application logs to a remote syslog server.

Plugging iPhone’s Privacy

July 3, 2019 – 11:19 am

Many recent publications , , suggest the iPhone is full of security holes threatening your privacy. The threat seems to be coming not so much from the phone’s operating system, but from the apps, …

Squeezing Video Files

June 30, 2019 – 11:16 am

All that crap I’ve been saving from YouTube, Facebook and whatnot tends to add up. As quality is not a huge concern here (not that it was very high to begin with), optimizing those video …

Finding Passwords in Logs and Shell History

June 27, 2019 – 11:15 am

Sooner or later it will happen: you type something after which you expect a password prompt then, without looking, you type the password. However, you fat-fingered the first command, and your password ended up in …

Anatomy of Internet Bullshit

June 25, 2019 – 11:12 am

Here’s an oldie from two years ago that reared its ugly head on Pocket: Starting Your Day on the Internet Is Damaging Your Brain, by Srinivas Rao. The author presents his personal opinion that reading …