Bash

Saving your bacon: recovering from a serious Linux issue

Saving your bacon: recovering from a serious Linux issue

This is a slightly more detailed post than usual, based on bitter experience. How do you recover when you've accidentally deleted all the files in your /etc/ directory? Here's how. Backup, rescue CD, tar, gzip, scp, rpm --verify, done.

Read more »

Quickie Linux tip: most recently modified files

Quickie Linux tip: most recently modified files

Image via Wikipedia This little tip is not really deserving of its own post, but here goes. Assume for the moment that you are one of those ADHD busy people who saves files into a folder so fast that you don’t remember their names. Maybe you don’t even remember last night. Or the names...

Read more »

First steps towards securing an Apache box on CentOS 5.4

First steps towards securing an Apache box on CentOS 5.4

I’m mainly writing this to document some tentative steps that I’ve taken to secure a CentOS server. The server is used for a LAMP-based application with a really predictable URL. The box gets probed a lot. If you have additional questions or comments, please post a comment. Step 1: Turn on the host firewall...

Read more »

Scheduling Tasks in CentOS – crontab

Scheduling Tasks in CentOS – crontab

Crontab is the venerable task scheduler for Unix-derived systems. To schedule tasks, you configure a table of entries that occur in some sort of chronological fashion, hence “crontab”. Image via Wikipedia To set up a crontab entry, enter crontab -e at the shell prompt. This will bring up an entirely blank screen in vim,...

Read more »

Accessing a VirtualBox guest over ssh

Accessing a VirtualBox guest over ssh

This goes over to the right of the geek-o-meter. I’ve been swimming virtualization lately: openvz, VirtualBox, and most recently, Amazon’s S3/EBS/EC2. For quick test projects, I really like VirtualBox running on my mac. However, I ran into a small hiccup: I needed to have a NAT’ed RedHat box running inside of VB. I need...

Read more »

Using mailman and bash to show list subscriptions suspended for bounces

If mail to a mailman mailing list subscriber bounces too many times, further deliveries to that address are suspended. It’s often useful to track down these addresses. # cd /usr/local/mailman/bin/# for i in `./list_lists -b`; do echo : $i : >>/tmp/bounced.txt;./list_members –fullnames –nomail=bybounce $i >>/tmp/bounced.txt;done The contents of the file will look like this:...

Read more »

Quickie script to update mailman aliases

We run sendmail as our MTA and mailman as our list management solution. This is a script that we use to manage updates for mailman aliases. It leverages the built-in mailman command “genaliases” which will regenerate sendmail-style aliases for all of the lists on the system. 1 2 3 4 5 6 7 8...

Read more »