Articles by Lance Cleveland

cPanel Brute Force Protection – regaining access

cPanel Brute Force Protection – regaining access

cPanel comes with a great feature called brute force protection.  The problem is, if you mis-type your password 5x in a row or if you have multiple people in the office, like we do, that try to get into various services and they combine to have 5 missed passwords in a row (ssh, mail, and whm logins all quality) then you will lock yourself out of your system.   Here are some tips & tricks that will help you regain access. Gaining Initial Access The easiest and quite possibly ONLY way to get back into your system is by logging in from a different IP address.  Sometimes you can do this by re-initializing your modem/router if you are on a DHCP assigned address from your ISP.  This is usually the case for residential service from DSL companies like AT&T (no other ...

Upgrading Redmine From 0.9.6 to 1.0.0

Upgrading Redmine From 0.9.6 to 1.0.0

Much of this post is repeated in the Upgrading Redmine from 0.8 to 0.9.3 post we did a few months back.  Now with Redmine 1.0 RC out, the upgrade process is once again not as simple as doing a subversion update.  If you are downloading tarzips and installing "manually", we recommend saving some time and learning basic subversion commands.  Subversion checkout and update is much faster and easier once you have the initial installation in place. These are Cyber Sprocket's notes from our upgrade. For more information you may want to visit the official documentation site. Our Environment The environment we were running before upgrading to Redmine 1.0(RC): Redmine 0.9.6 Apache 2.2.7 MySQL 4.1.22* * Note - we have had discussions with the Redmine development team regarding the MySQL version.  We are running MOST features with no problem on MySQL 4.1, ...

Setting Up Raid 1 On Ubuntu 10.04

Setting Up Raid 1 On Ubuntu 10.04

The following has been distilled from https://help.ubuntu.com/10.04/serverguide/C/advanced-installation.html and revised to match our operating process. Partitioning Follow the installation steps until you get to the Partition disks step, then: Select Manual as the partition method. Select the first hard drive, and agree to "Create a new empty partition table on this device?". Repeat this step for the second drive. Select the "FREE SPACE" on the first drive then select "Create a new partition". Next, select the Size of the partition. This partition will be the swap partition, and a general rule for swap size is twice that of RAM. Enter the partition size, then choose Primary, then Beginning. Select the "Use as:" line at the top. By default this is "Ext4 journaling file system", change that to "physical volume for RAID" then "Done setting up partition". For the / partition once again select ...

0 Comment   |   Posted in Ubuntu,blog,servers August 12, 2010

Linux mdadm tips & tricks

RAID arrays are an important part of any mission critical enterprise architecture. When we talk RAID here we are talking mirrored RAID, or mirrored and striped RAID, not simply striping which gives you a larger drive from several smaller drives. While that may be great for some home or desktop applications, for a enterprise application that simply doubles your changes of a failed system. We often spec out RAID 1 or higher mirrored systems with RAID 1+0 being the most common (mirrored and striped) so that you increase access performance AND keep the system up if a single drive fails (on a 3 drive RAID 1+0 configuration). Along the way we've learned some tips & tricks that may help you out. To start with we'll post some info on Linux RAID and eventually expand this article to include Windows information. Fake v. Real Raid One thing ...

0 Comment   |   Posted in System Administration,Tips & Tricks,Ubuntu,blog July 30, 2010
PostgreSQL Cheat Sheet

PostgreSQL Cheat Sheet

PostgreSQL is one of our favorite database engines for a variety of reasons.  Here is our cheat sheet to help you get online and get around Postgres with minimal effort. Database Access Security Database security is handled primarily in two place, from the system service level via a file called pg_hba.conf and within the database metadata files themselves.   The pg_hba.conf file controls what level of credentials are needed based on what IP address the requesting connection is coming from.   The metadata within the engine itself generally controls user level access once they are connected and approved at the system level. Systemwide Configuration via pg_hba.conf This file matches IP address with a set of rules to determine how much data you need to provide in the first place before getting access to the database engine.   It includes the IP address, the username ...

0 Comment   |   Posted in Database,PostgreSQL,blog July 04, 2010
WordPress Image Galleries

WordPress Image Galleries

One of the nice features of WordPress that we just started using recently is the built-in image galleries. However, as we found out the hard way, it is important to go about creating your image sets for pages and posts carefully. If you attach unwanted images to your page or post it is nearly impossible to remove them from your gallery. Luckily there are some options that can help remedy this situation after-the-fact.  Below are some tips & tricks that we hope will help you manage your WordPress images and galleries the easy way! WordPress Image Gallery, The Easy Way The easiest way to ensure your on-page image gallery only contains images you want is to upload any images you DO NOT WANT in the gallery via the admin sidebar "Media / ...

0 Comment   |   Posted in Wordpress,blog July 01, 2010
Cyber Sprocket IP Blacklist

Cyber Sprocket IP Blacklist

The following IP addresses have been blacklisted on our servers due to excessive break-in attempts. If your internet service provider (ISP) or internet presence provider/web host (IPP) is on this list your servers (or desktop computer) will not be able to access any of the Cyber Sprocket servers or the servers we manage for our clients. If your IP address is on this list and you wish to be removed send us a request via the Contact Us form requesting access to our servers, the reason for your access request, and the specific IP address that you want to use to talk to our servers. Each whitelist request will be considered on a case-by-case basis. We also recommend that you contact your ISP/IPP and ask them to deal with the hackers that ...

0 Comment   |   Posted in Security,System Administration,blog June 30, 2010
Redmine Wiki Formatting with Textile

Redmine Wiki Formatting with Textile

We use Redmine rather extensively for managing both our consulting projects and our commercial product releases. While the default commands listed in the Redmine help pages are useful, here are some additional formatting tricks to help you get the most out of your Redmine posts. This also works quite well in forum posts and issue reports. Formatting a Paragraph These simple tricks work quite well for headers as well, simply replace the p with h1, h2, or h3.  Remember to put a space after the period that ends the formatting directive. Align the paragraph to the left (default): p<. The paragraph text. Align the paragraph to the right: p>. The paragraph text. Center alignment: p=. The paragraph text. Left side indent by 1em (character): p(. Paragraph text here Left side indent ...

Word 2007 Blank Pages Between Chapters

Word 2007 Blank Pages Between Chapters

While working on a documentation project for a client we ran into a unique problem.  According to good technical writing practices, you always want chapters to start on an odd page.  This puts new chapters on the right-hand page of a bound book.  You also want to ensure that any preceding blank page is not 100% blank, most standards dictate at least a footer with a page number and possibly a header with the title of the prior chapter (old school methods were to put a "This page intentionally left blank." message on the preceding blank page, which is one of my favorite all time ironies).  After digging around for hours (OK, maybe 10 minutes) I found the solution to this blank page problem. It turns out that when you are forcing pages to start on an odd page # for things ...

0 Comment   |   Posted in Desktop Apps,Word,blog June 22, 2010
Changing Network Device Priorities In Vista

Changing Network Device Priorities In Vista

My Windows Vista laptop has a strong desire to always connect to the wireless network, even when I'm connected-by-wire at the office.   This is due to the fact that most Windows laptops are setup to use the wireless connection first if there is a wireless signal available.   While I was always able to quickly find this setting in Windows/XP, on Windows Vista it is hidden away in a "advanced menu".   For some reason I always forget how to find it, thus this blog post serves as my own memory kit. How To Change Network Priorities In Vista Go to your mange networks settings. I like to get there by right-clicking the network icon in the systray & selecting "manage networks". You can also go to the start menu, control panel, network connections Hold down the ALT key, release then click "Advanced Settings..." within a  ...

0 Comment   |   Posted in Windows,blog,desktop computing June 22, 2010
WordPress – Sharing A Base Class Amongst Plugins

WordPress – Sharing A Base Class Amongst Plugins

Introduction The new series of MoneyPress plugins that is coming out in the next month is going to be based on a common foundation.  This allows us to maintain consistency, share new features across the product line, and provide an improved quality product that gets out to the consumer. However, during the migration to this new shared platform we uncovered some problem areas deep within the bowels of WordPress.  Yes, even with the recently released 3.0 version.   However we don't blame this on WordPress.   Far from it.  WordPress is  a well engineered application, it's only fault is being tied into archaic versions of PHP... which means anything prior to PHP 5.3 when namespaces were finally introduced.   There is a reason many languages have had namespaces for years, but that is a discussion for another post. One of the more nagging problems was ...

Using Find To Help Manage Files On Linux

Using Find To Help Manage Files On Linux

We found a system administration problem on a  server today that was being caused by incorrect directory permissions.  Any email that passes through the server-wide spam filter was not going through because of permissions on the /home/<domaindir-here>/etc directory.  That directory needs to be owned by mail. Here is a quick way to update those directories: [root@host:home]# cd /home The find command only lists directories (much, much faster if you know you only need a certain file type like ‘d’), up to 2 levels deep (.  = current directory = level 1), and matching the name etc…  [root@host:home]# chgrp mail `find /home -maxdepth 2 -type d -name etc` Now we pass find as a variable list to the ls command to see what we touched.  The ‘d’ on ls also restricts it to directory level output only, so we don’t descend into those ...

0 Comment   |   Posted in System Administration,blog,files June 18, 2010
What’s Wrong With Guru.com

What’s Wrong With Guru.com

Extortion OK, Chargebacks Not Last Friday, Guru.com suddenly and without warning shut down our account. We were a well established vendor on Guru.com.  In fact, we were consistently ranked a top-50 vendor of nearly 50,000 vendors in the Programming & Databases sector, reaching the top 25 at one point.  If we hadn't opted to take on a major project outside of Guru.com that kept us from doing new business there for most of the past year we'd have reached the top 10 with ease. Surprise! You're Done Here. What was really surprising is that after 5 years of working with Guru.com and being a top ranked vendor,  they terminated our account with no warning.  No email, no phone call, no communication of any kind.  We simply logged into the system in an effort to communicate ...

0 Comment   |   Posted in Project Management,blog June 14, 2010
More PHP Woes

More PHP Woes

I’ve been screwing around with the error response codes for CafePress and finally reached a dead end.  My only choice if I want to support 4.3 (as the required version for WordPress 2.9.2) is to use this wonderful gem that Eric & Chris shared with me last night: $result = @file_get_contents($url); That hides all warnings & returns false into the $result variable. Why does file-get_contents() return an error?  Because CafePress, rightfully so, returns a header with a 400 code saying “bad request”.   The fact of the matter is my request is bad, I’ve input an invalid section ID, just as a client might to by accident.  Rather than barf all over their web pages I’d prefer to catch the error gracefully, tell them about it, and move on. The problem is that file_get_contents will NOT fetch the content of ...

0 Comment   |   Posted in PHP,Programming Languages,blog June 12, 2010

Windows XP – Resolving Aquiring Network Address Problems

After spending nearly a week on & off removing a virus from a notebook computer, we are down to one last task... getting the network services back online.   Here are some notes about how to get around this problem and the ever-present "acquiring network address" that never is acquired. Resetting Windows Network Stacks To reset the Windows/XP TCP/IP stack use this command from the command shell: netsh int ip reset reset.log To reset the Windows/XP Socket layer, use this command from the command shell: netsh winsock reset catalog Check For Rootkits Turns out the virus installed a rootkit.  These are special files hidden by the operating system that change how the base OS works.  That makes them hard to detect & remove with normal spyware.  TDSS rootkit by Kapersky Labs helps fix that: Download install and run TDSS rootkit removing tool - get it here: http://support.kaspersky.com/downloads/utils/tdsskiller.zip In our case the file c:\WINDOWS\system32\DRIVERS\isapnp.sys was compromised.  You ...

0 Comment   |   Posted in blog,desktop computing June 09, 2010