Articles in Featured
How Not to Prepare for a SysAdmin Interview
The Linux Foundation just gave birth to seven supposedly interesting tips on how to prepare for a Linux SysAdmin job interview. Unfortunately, the research behind all this probably excellent advice was based on interviewing hiring …
Automating Web Page Screenshots
Automatic Web page screenshots are commonly used for various monitoring tasks, such as detecting copyright infringement, website defacement, and other legal and security matters. Automatic screenshotting can also be a useful tool for researchers, developers, …
Encrypted Volumes and Portable Apps
This is a description of an uncomplicated setup for an encrypted volume and portable applications for a Windows laptop consisting of a USB3 storage device, VeraCrypt OSS OTFE, a hardware password wallet, and portableapps.com software.
Detect SSL Certificate Injection
When the SSL Digital Certificate is intercepted and replaced by a device between your browser and the Web site, we call it certificate injection. This method is more commonly used not by hackers, but by …
SSL For Self-Hosted WordPress
Just some notes for setting up SSL with your self-hosted WordPress hosting installation. Just got around to doing this the other day. Yeah, I know, about time…
Obfuscating Passwords in Shell Scripts
At the risk of repeating myself, I must say that this article is about obfuscating passwords – rendering obscure, unclear, or unintelligible – not hiding them. This can still be useful.
Occupy Subnet
The script below (tested on RHEL 7) will use arp-scan to identify unused IPs on your subnet and configure virtual interfaces attached to your primary NIC to take over every available IP.
Whiptail and Dialog Snippets
Whiptail is a newt-based utility allowing to build pseudo-graphical dialog boxes from shell scripts. Dialog uses ncurses and is similar to whiptail but has more options and, consequently, a bit harder to use. I find both useful …
CLI System Monitoring Tools
The multitude of sophisticated centralized monitoring tools available these days excel at one thing: telling you what happened while you’ve been sleeping. But what if you’re awake and need to know what’s going on right …
Checking Multiple Variables in Bash
Let’s say you have a dozen variables in your script and you need to check if they have values set. The usual approach can get a bit tedious.
Selecting Time Ranges from Logs
Consider a common situation: you would like to select lines from a log file that match a specific string, but only during a specific time frame. For example, my /var/log/messages contains entries from one of the …
Parallel Rsync
This is an update of the script I originally wrote five years ago and used to migrate many terabytes of production data between two NAS systems. What’s new: more efficient subfolder crawling, more effective way …
SystemD: Back To The Future
A creature in its death throes, Sun Microsystems gave birth to Solaris SMF – the product of a disturbing union between Unix System V and the Microsoft Windows Registry. Shortly thereafter the proud father died, …
Migrating Filesystems with Active Processes
I’ve run into an interesting challenge: I needed to migrate application data from a local filesystem to NFS without stopping the processes running in the original mountpoint. Here’s a basic overview of the process. This …
Sample Salt Proxy Configuration for vCenter/ESX
The Salt proxy agent is a relatively new feature of Salt allowing to control networked devices where salt-minion cannot be installed directly. The official Salt documentation on the subject is outdated and full of syntax errors. It’s actually …
Recover Crontabs from Log
Some time ago I was using PDSH to update root crontab on a bunch of servers and ran into what looked like a PDSH-specific bug. The same command that worked just fine when executed locally or …
DHCP Server Log Analysis
A quick script to go through your DHCP server log and get a summary of MAC addresses and associated DHCP requests. The script will attempt to download the IEEE OUI list for identifying the manufacturers …
Real-Time Log Stats With Logtop
Logtop is an awesome, albeit a little quirky, real-time log analysis tool developed by Julien Palard. You should use logtop when time is of the essence. When you cannot wait for your cron job to run …
Removing Strings from Binary Log Files
Below is a quick script that will replace specified strings in binary files with random values. A word of caution: the script will preserve the file’s original ctime by briefly changing system time. Obviously, this requires …
Watching VSFTP
I have an FTPS server running VSFTP and below is collection of commands useful for monitoring activity and analyzing the logs.
Check Filesystem Mount Status
Sometimes you just need to do a quick sanity check on the filesystem mount status to make sure everything in fstab is mounted and everything’s that mounted is in the fstab. If, like myself, you’re a fan …
Atop Script with Scheduling and Logging
When something is going down on a server, the first thing most sysadmins will run is the venerable top utility. This happens automatically: if you suspect the server is being sluggish, your fingers just type top without you …
Latest Comments