Category: Reliable Penguin

Find group writable home directories

With procmail, vacation and forward files do not work if the user’s home directory is group writable. Here’s a script that will locate all group writable home directories:

Read More »

Content Sync For Load Balancer With Unison

This Unison program is great. It neatly handles syncing between two servers where changes are occurring on both sides. On one client site it takes about 30 seconds to compare/sync a 23GB /var/www/html/ structure with about 100 sites. 1) Install unison (http://www.cis.upenn.edu/~bcpierce/unison/). Requires “ocaml” compiler (http://caml.inria.fr/), and needs the “etags” command from emacs (so “yum install emacs”, whatever) 2) Set up a “/root/.unison/profile-name.prf” file. See example pasted below. Comment out “batch=true” and “silent=true” for initial test runs. Uncomment them for running from a cron job. 3) Run manually to test: unison profile-name 4) If you leave the logging turned on, make an /etc/logrotate.d/unison file, something like this:

5) Set up cron job(s). Create multiple profiles if specific paths need more frequent syncing. With silent=true, the jobs should produce no output (silent=true automatically sets batch=true). Sample profile (/root/.unison/profile-name.prf)

Read More »

SED Search / Replace Multiple Files

I’m a big fan of the “replace” utility included in the mysql client package. With this utility you can search/replace a string of text across multiple files like this:

Quick and easy! But on occasion I’m on a system that doesn’t have the mysql client package so here’s a similar function using find and sed:

Read More »

Forcing ARP table flush

I just ran across this method for remotely forcing a gateway to flush an arp entry when you move IP addresses around. 1) Download/install “arping” from the following URL. System will need libnet-devel and libpcap: http://www.habets.pp.se/synscan/programs.php?prog=arping 2) Run this command: arping -c 1 -S a.a.a.a b.b.b.b Where “a.a.a.a” is the IP you’ve moved, and “b.b.b.b” is the gateway IP. Run this from the server to which you moved the IP. This should force the gateway to flush its arp entry for that source IP.

Read More »

Plesk Horde Vulnerablity Fix

Below is the quick fix for the Plesk-Horde vulnerability. Manually apply a patch to the Horde Permission’s User Interface code to “remove” the “All Authenticated Users” option from the HTML form: A quick fix to hide this setting in the UI code is to add HTML comments (“<! –” … “–>”) around the “All Authenticated Users” options in the HTML form. Basically, it is to add “<! –” at line 63 and “–>” at (original) line 81 in /usr/share/psa-horde/templates/shares/edit.inc

Read More »

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.