Featured »

March 2, 2022 – 2:00 pm

Books have been written on the subject of awk and sed. Here’s a small sample of commands I put together over the years that are useful for everyday system administration tasks. Most of these tasks …

Read the full story »
Networking

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

Applications

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

Data

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

Monitoring

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.

Plundering Facebook Photo Albums

September 30, 2021 – 11:42 am
wyryr1sn52gntzn65v4fpz5lc6v[1]

Let’s imagine you need to download all the photos in a Facebook photo album. It can be a public album, a friend’s, or even your own. Sure, you can do this manually, but you probably …

Scraping a Web Page in Bash

September 23, 2021 – 11:33 am
clfud46mxf2t5zph2l04zlpgl1d[1]

Just a scripting exercise because I need to do something important, but I am procrastinating. The idea is simple: grab some URL with text containing somewhat structured data and convert it into a spreadsheet. I …

Generating Random Text Files for Testing

September 16, 2021 – 11:31 am
91ebozy1e3b138waujy28agrngy[1]

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 …

Finding Cron Jobs

September 9, 2021 – 11:28 am
iwoau71okwxqh4jv3k4ook32qps[1]

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 …

Renaming Files with exiftool

September 2, 2021 – 11:25 am
b8g72yca7casi5shj7otypjbi20[1]

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, …

IP Geolocation from Shell

August 25, 2021 – 11:23 am
af1bc14559a18ce803edf27dd4638734[1]

A handy utility by Rafael Rinaldi called whereami allows you to geolocate an IP address directly from the command line. Here are some quick notes on installing and using this tool.

Approximate String Matching

August 18, 2021 – 11:15 am
IMG_6210-scaled[1]

On occasion I find myself searching for something in log files or in my Bash history, but I can’t quite remember what it is that I am looking for. Come to think of it, this …

Understanding Memory Utilization in Linux

August 11, 2021 – 11:10 am
5gtysva4wkc8mzc1k3e66vaycxx[1]

This is a depressing – and all-too-common – scenario: a user runs the free command and opens a support case because he sees zero “free” memory on the server.

Fixing Sudo

January 28, 2021 – 11:53 am
c3i8vv2eqg40fc05p9whm8yjys0[1]

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.

Processing Videos with ffmpeg and Lightroom

October 12, 2020 – 1:52 pm
DSCF5361[1]

On occasion I wondered how to apply advanced photo filters to my lackluster GoPro and drone videos. You know, not the basic exposure/contrast/saturation or the cheesy special effects you find in video editors, but something …

Searching Twitter

October 11, 2020 – 1:50 pm
Cat-Devouring-A-Bird-Pablo-Picasso[1]

Here are just a few hopefully useful tips for searching Twitter to get more relevant results and buy cheap twitter followers.

Bash Scripts and MySQL

October 10, 2020 – 1:49 pm
1fxshw1sngujguztkvexhxu0no9-2[1]

I frequently use MySQL to store data collected or processed by various shell scripts. The database comes in handy when massaging data with good old awk and sed gets too cumbersome.

Bulk Create Linux Users using Salt

October 9, 2020 – 1:48 pm
l5km2qq7sz7bbvg5pra24eygsdp-2[1]

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
IMG_5456-scaled[1]

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 …

Coronavirus Stats in Bash

October 7, 2020 – 1:40 pm
IMG_5435[1]

The result of my morbid fascination with the coronavirus situation is this quick bash script that parses Johns Hopkins University coronavirus data to generate a quick report for the current date for the specified countries.

Updating Lynis

October 6, 2020 – 8:22 am
IMG_5427

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
IMG_5301

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.

Convert Code Snippets to PNG

October 4, 2020 – 8:19 am
2apzqxrvorckslw14x029ua67ku

On occasion I find myself struggling posting code on discussion forums that don’t handle code formatting all that well. What would’ve helped is some quick and easy way to convert code to an image file …

Backup Options for Raspberry Pi

October 3, 2020 – 8:16 am
IMG_5275

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.

Affordable Linux Server

October 2, 2020 – 8:14 am
IMG_5264-scaled

A friend asked me what server I would recommend to run Linux. Yes, a very broad query. After a few followup questions we’ve determined the server will be used to run VMs, or Apache, or …

Backing Up WSL Images

October 1, 2020 – 8:13 am
v7oe8qnrpcxhmu3bw4m0qrja3uz

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
3wve96qqllhu6wkgqmzmqgzo19q-2-gigapixel

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”. …