Articles in Featured
Approximate String Matching
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
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.
Processing Videos with ffmpeg and Lightroom
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
Here are just a few hopefully useful tips for searching Twitter to get more relevant results and buy cheap twitter followers.
Bulk Create Linux Users using Salt
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
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
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
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
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
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
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
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 …
Home-Brew Ransomware Defense
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”. …
Validating HTTPS Cache Peers for Squid
I have a squid proxy server that uses a long list of authenticated cache peers in a round-robin configuration. The process looks something like this:
Analyzing atop Logs with atopsar
I have discussed atop previously but concentrated primarily on how to run it and how to collect data. Now I’d like to spend some time talking about ways to analyze the data collected with atop.
Appending Filenames
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 …
Selecting Time Ranges from Logs, Part 2
A couple of years ago I wrote an article about selecting specific time ranges from log files. I proposed two options: either convert all timestamps to epoch format (a CPU-intensive process) or rely on regex …
Automatically Block Frequent Visitors
I had a few similar scripts floating around this site, but this one is a bit more all-inclusive and better organized. The script will analyze your firewall/whatever access log and block particularly active visitors.
Detecting Blurry Photos with ImageMagick
Here’s a typical scenario: I go to a birthday party where everyone knows I’m a shutterbug, so I have to bring my camera. As time goes by and blood alcohol concentration rises and attention to …
Working with iptables Logging
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
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 …
Analyzing Network Performance
Much of network performance analysis will be comparative in nature. Thus, seeing the output of multiple commands side by side can be quite useful. Bash has a useful little utility called pr and we’ll make …
Latest Comments