Permanently Disable iTunes on OS X

So this isn’t really the normal theme for my articles. However I’ve reloaded the OS on my MacBook Pro the other day, because my factory hard drive died within 8 months of buying the MacBook. I replaced it with a 256GB Samsung 840 Pro SSD and reloaded the OS via net-install (Apple+R on boot.)

About 3-4 days later iTunes decided to open itself over and over every 20 minutes to remind me to accept it’s license agreement. I don’t use iTunes and have no need to accept the agreement, furthermore I don’t like that it pops up again immediately after I hit decline, then again 20 minutes later. Plus it runs in the background and wastes resources while trying to coax you into using it.
Continue reading

Posted in OS X | Tagged , , , , , , , , , , , , , , , | Leave a comment

Understanding suPHP Permissions – Why am I getting 500 Internal Server Error?

I see this topic come up a lot with users who migrate to one of our servers or to their own setup with cPanel and suPHP. The user or their customers will install a PHP script such as wordpress, concrete5, etc… Upon testing their installation they will get 500 ISE (Internal Server Error) in their web browser, served from Apache. Many less experienced users freak out and think something is wrong with the server. The reality is that permissions or file ownership is the cause of the error in the VAST majority of cases. Continue reading

Posted in Bash One-Liners, cPanel Guides, Linux Guides | Tagged , , , , , , , , , , , , , | Leave a comment

MyISAM Repair all MySQL Databases & Tables

So you’ve probably not made the switch to InnoDB or XtraDB yet, shame on you! But tonight your server crashed, ran out of disk space or otherwise corrupted all of your active tables across various databases. Ouch! How are we going to fix this one?

Many admins try using the myisamchk tool from shell in an attempt to repair the MYI files. This may or may not work. I generally don’t recommend it as a primary means to a repair, especially if you are going to continue running mysqld and attempting to use the crashed tables. Continue reading

Posted in Bash One-Liners, Linux Guides, MySQL | Tagged , , , , , , , , | Leave a comment

Reset Supermicro IPMI Password From Windows

I recently had an issue where we lost the password for IPMI to a brand new Supermicro server. The server was running Windows 2008 STD. Not wanting to mess around rebooting the box to a livecd I had to find a solution to reset the password. This could be very useful for those of you buying a used Supermicro server or if someone fat fingers a password or logs it incorrectly into your management system. Continue reading

Posted in Server Hardware | Tagged , , , , , , , , , , | Leave a comment

suPHP on CentOS 6 from Source Code

So you’ve decided that you must run php as suPHP on your CentOS 6 based LAMP stack. This is a great idea for security on a multi-site or multi-user environment. Of course management panels like cPanel make running suPHP very easy, but what about the rest of us? Many of us do not use cPanel, perhaps because of the cost or because it’s resource intensive. Personally I like cPanel as a product, but I choose to forgo cPanel on servers requiring a high degree of security in an effort to minimize the amount of services that must be secured and updated. However I still want things like suPHP. Continue reading

Posted in Linux Guides | Tagged , , , , , , , , , , , | Leave a comment

AWK to win friends and influence women

AWK is a powerful tool, a language really, that every administrator needs to know. I recommend everyone read about awk and learn how to use it. It can really make your day when you need to do something, quick and dirty.

You will definitely win some friends with your awk skills, but probably not too many women ;-). Continue reading

Posted in Bash One-Liners | Tagged , , , , , , , , , , , , | 1 Comment

CRON ERROR: failed to open PAM security session: Protocol not supported

Got an interesting report of an error on one of our servers. I was told crons for a user account on our server weren’t running. I tailed the cron log (/var/log/cron) and came to find these errors:

Oct 13 06:32:01 secure crond[4558]: CRON (clients) ERROR: failed to open PAM security session: Protocol not supported
Oct 13 06:32:01 secure crond[4558]: CRON (clients) ERROR: cannot set security context

Continue reading

Posted in Linux Guides | Tagged , , , , , , , , , , | Leave a comment

ZFS on Linux RC10 released!

The ZFS on linux team has released a new version of SPL and ZFS with multiple benefits to users. The new version is 0.6.0-rc10 and our guide found here is being updated now:

Installing ZFS RAID-Z on CentOS 6.2 with SSD Caching

Posted in Linux Guides | Tagged , , , , , , | Leave a comment

Pick random line from text file with bash and shuf.

So lets say you have a text file called list.txt with entries like:

apple
orange
peach
pear
strawberry
grape
lemon
lime

What if you wanted to pick a random entry? The easiest solution is to use the ‘shuf’ tool, which is standard on CentOS as part of coreutils.

shuf -n 1 list.txt

The output would be a random line from our file!

Posted in Bash One-Liners, Linux Guides | Tagged , , , , , , , | Leave a comment

New ZFS on Linux release (RC9).

We have one of the most comprehensive guides on the internet for ZFS. Please check the updated guide for assistance with installing ZFS on Linux, specifically CentOS 6.2 here:

Installing ZFS RAID-Z on CentOS 6.2 with SSD Caching

Posted in Linux Guides | Tagged , , , , | Leave a comment